summaryrefslogtreecommitdiff
path: root/baserock_openid_provider
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-11-07 16:45:34 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-11-07 16:50:00 +0000
commitc477ea2b981d9c3b2f38fc444a7ecb28aaf818bc (patch)
treee503feb21c9a46545e089a056a3fadffe1c07851 /baserock_openid_provider
parentfdd3b01fc452a53b9d2a1cf480fc72765282c8f4 (diff)
downloadinfrastructure-c477ea2b981d9c3b2f38fc444a7ecb28aaf818bc.tar.gz
openid_provider: Import basic templates for django-registration
Fetched from https://github.com/macdhuibh/django-registration-templates commit 73b3d1905198c60eeebcc2fe2d764e98ba88e708. These provide basic templates for the django-registration module. Thanks to Anders Hofstee for providing them!
Diffstat (limited to 'baserock_openid_provider')
-rw-r--r--baserock_openid_provider/templates/base.html39
-rw-r--r--baserock_openid_provider/templates/index.html6
-rw-r--r--baserock_openid_provider/templates/registration/activate.html8
-rw-r--r--baserock_openid_provider/templates/registration/activation_complete.html6
-rw-r--r--baserock_openid_provider/templates/registration/activation_email.txt6
-rw-r--r--baserock_openid_provider/templates/registration/activation_email_subject.txt1
-rw-r--r--baserock_openid_provider/templates/registration/login.html27
-rw-r--r--baserock_openid_provider/templates/registration/logout.html6
-rw-r--r--baserock_openid_provider/templates/registration/password_change_done.html6
-rw-r--r--baserock_openid_provider/templates/registration/password_change_form.html11
-rw-r--r--baserock_openid_provider/templates/registration/password_reset_complete.html10
-rw-r--r--baserock_openid_provider/templates/registration/password_reset_confirm.html21
-rw-r--r--baserock_openid_provider/templates/registration/password_reset_done.html6
-rw-r--r--baserock_openid_provider/templates/registration/password_reset_email.html5
-rw-r--r--baserock_openid_provider/templates/registration/password_reset_form.html11
-rw-r--r--baserock_openid_provider/templates/registration/registration_closed.html6
-rw-r--r--baserock_openid_provider/templates/registration/registration_complete.html6
-rw-r--r--baserock_openid_provider/templates/registration/registration_form.html11
18 files changed, 165 insertions, 27 deletions
diff --git a/baserock_openid_provider/templates/base.html b/baserock_openid_provider/templates/base.html
index f491adf6..26af1a30 100644
--- a/baserock_openid_provider/templates/base.html
+++ b/baserock_openid_provider/templates/base.html
@@ -1,14 +1,37 @@
-<html>
+{% load i18n %}
+<!DOCTYPE html>
+<html lang="en">
+
<head>
-<title>
- {% block title %}
- {% endblock %}
-</title>
- {% block extrahead %}
- {% endblock %}
+ <link rel="stylesheet" href="{{ STATIC_URL }}style.css" />
+ <title>{% block title %}User test{% endblock %}</title>
</head>
+
<body>
- {% block content %}
+ <div id="header">
+ {% block header %}
+ <a href="{% url 'index' %}">{% trans "Home" %}</a> |
+
+ {% if user.is_authenticated %}
+ {% trans "Logged in" %}: {{ user.username }}
+ (<a href="{% url 'auth_logout' %}">{% trans "Log out" %}</a> |
+ <a href="{% url 'auth_password_change' %}">{% trans "Change password" %}</a>)
+ {% else %}
+ <a href="{% url 'auth_login' %}">{% trans "Log in" %}</a>
+ {% endif %}
+ <hr />
+ {% endblock %}
+ </div>
+
+ <div id="content">
+ {% block content %}{% endblock %}
+ </div>
+
+ <div id="footer">
+ {% block footer %}
+ <hr />
{% endblock %}
+ </div>
</body>
+
</html>
diff --git a/baserock_openid_provider/templates/index.html b/baserock_openid_provider/templates/index.html
new file mode 100644
index 00000000..9a13184b
--- /dev/null
+++ b/baserock_openid_provider/templates/index.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+Index page
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/activate.html b/baserock_openid_provider/templates/registration/activate.html
new file mode 100644
index 00000000..8deb01c8
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/activate.html
@@ -0,0 +1,8 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+<p>{% trans "Account activation failed" %}</p>
+
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/activation_complete.html b/baserock_openid_provider/templates/registration/activation_complete.html
new file mode 100644
index 00000000..aa93bcc3
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/activation_complete.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Your account is now activated." %}</p>
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/activation_email.txt b/baserock_openid_provider/templates/registration/activation_email.txt
new file mode 100644
index 00000000..911df019
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/activation_email.txt
@@ -0,0 +1,6 @@
+{% load i18n %}
+{% trans "Activate account at" %} {{ site.name }}:
+
+http://{{ site.domain }}{% url 'registration_activate' activation_key %}
+
+{% blocktrans %}Link is valid for {{ expiration_days }} days.{% endblocktrans %}
diff --git a/baserock_openid_provider/templates/registration/activation_email_subject.txt b/baserock_openid_provider/templates/registration/activation_email_subject.txt
new file mode 100644
index 00000000..24f477cb
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/activation_email_subject.txt
@@ -0,0 +1 @@
+{% load i18n %}{% trans "Account activation on" %} {{ site.name }}
diff --git a/baserock_openid_provider/templates/registration/login.html b/baserock_openid_provider/templates/registration/login.html
index 1aff0969..9b245989 100644
--- a/baserock_openid_provider/templates/registration/login.html
+++ b/baserock_openid_provider/templates/registration/login.html
@@ -1,26 +1,15 @@
{% extends "base.html" %}
+{% load i18n %}
{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
-{% if form.errors %}
-<p>Your username and password didn't match. Please try again.</p>
-{% endif %}
-
-<form method="post" action="{% url 'django.contrib.auth.views.login' %}">
-{% csrf_token %}
-<table>
-<tr>
- <td>{{ form.username.label_tag }}</td>
- <td>{{ form.username }}</td>
-</tr>
-<tr>
- <td>{{ form.password.label_tag }}</td>
- <td>{{ form.password }}</td>
-</tr>
-</table>
-
-<input type="submit" value="login" />
-<input type="hidden" name="next" value="{{ next }}" />
+ <input type="submit" value="{% trans 'Log in' %}" />
+ <input type="hidden" name="next" value="{{ next }}" />
</form>
+<p>{% trans "Forgot password" %}? <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a>!</p>
+<p>{% trans "Not member" %}? <a href="{% url 'registration_register' %}">{% trans "Register" %}</a>!</p>
{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/logout.html b/baserock_openid_provider/templates/registration/logout.html
new file mode 100644
index 00000000..f8da51fa
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/logout.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Logged out" %}</p>
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/password_change_done.html b/baserock_openid_provider/templates/registration/password_change_done.html
new file mode 100644
index 00000000..659be0a4
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/password_change_done.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Password changed" %}</p>
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/password_change_form.html b/baserock_openid_provider/templates/registration/password_change_form.html
new file mode 100644
index 00000000..10b1fc13
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/password_change_form.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/password_reset_complete.html b/baserock_openid_provider/templates/registration/password_reset_complete.html
new file mode 100644
index 00000000..55993e85
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/password_reset_complete.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+<p>{% trans "Password reset successfully" %}</p>
+
+<p><a href="{% url 'auth_login' %}">{% trans "Log in" %}</a></p>
+
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/password_reset_confirm.html b/baserock_openid_provider/templates/registration/password_reset_confirm.html
new file mode 100644
index 00000000..33bd276a
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/password_reset_confirm.html
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% if validlink %}
+
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+
+{% else %}
+
+<p>{% trans "Password reset failed" %}</p>
+
+{% endif %}
+
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/password_reset_done.html b/baserock_openid_provider/templates/registration/password_reset_done.html
new file mode 100644
index 00000000..6057ccbe
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/password_reset_done.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Email with password reset instructions has been sent." %}</p>
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/password_reset_email.html b/baserock_openid_provider/templates/registration/password_reset_email.html
new file mode 100644
index 00000000..c78893ed
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/password_reset_email.html
@@ -0,0 +1,5 @@
+{% load i18n %}
+{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %}
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/password_reset_form.html b/baserock_openid_provider/templates/registration/password_reset_form.html
new file mode 100644
index 00000000..10b1fc13
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/password_reset_form.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/registration_closed.html b/baserock_openid_provider/templates/registration/registration_closed.html
new file mode 100644
index 00000000..c73cfacc
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/registration_closed.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+ <p>{% trans "Registration is currently closed." %}</p>
+{% endblock %}
diff --git a/baserock_openid_provider/templates/registration/registration_complete.html b/baserock_openid_provider/templates/registration/registration_complete.html
new file mode 100644
index 00000000..96a22ac4
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/registration_complete.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "You are now registered. Activation email sent." %}</p>
+{% endblock %} \ No newline at end of file
diff --git a/baserock_openid_provider/templates/registration/registration_form.html b/baserock_openid_provider/templates/registration/registration_form.html
new file mode 100644
index 00000000..6d0854d6
--- /dev/null
+++ b/baserock_openid_provider/templates/registration/registration_form.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form method="post" action=".">
+ {% csrf_token %}
+ {{ form.as_p }}
+
+ <input type="submit" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}