summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei MIHAI <smihai@entrouvert.com>2014-09-17 22:38:58 (GMT)
committerSerghei MIHAI <smihai@entrouvert.com>2014-09-19 15:46:35 (GMT)
commita1ea93302ad81c7c5411c811189a4e8463af0884 (patch)
tree3683a97617d2c311ec46cabfca5a1668b39cf38a
parent563749730f972f0caf362760376cd2ae8df2126d (diff)
downloadcalebasse-a1ea93302ad81c7c5411c811189a4e8463af0884.zip
calebasse-a1ea93302ad81c7c5411c811189a4e8463af0884.tar.gz
calebasse-a1ea93302ad81c7c5411c811189a4e8463af0884.tar.bz2
password change related pages adapted to site design
Closes #5449
-rw-r--r--calebasse/static/css/accounts.css17
-rw-r--r--calebasse/templates/registration/password_change_done.html20
-rw-r--r--calebasse/templates/registration/password_change_form.html39
3 files changed, 76 insertions, 0 deletions
diff --git a/calebasse/static/css/accounts.css b/calebasse/static/css/accounts.css
new file mode 100644
index 0000000..f8e4a58
--- /dev/null
+++ b/calebasse/static/css/accounts.css
@@ -0,0 +1,17 @@
+#password_change label {
+ float: left;
+ width: 15em;
+}
+
+#password_change div.form-row {
+ margin: 1em 0;
+}
+
+.icon-warning:before {
+ content: "\f071";
+ color: orange;
+}
+
+ul.errorlist, ul.errorlist li {
+ display: inline;
+} \ No newline at end of file
diff --git a/calebasse/templates/registration/password_change_done.html b/calebasse/templates/registration/password_change_done.html
new file mode 100644
index 0000000..552de15
--- /dev/null
+++ b/calebasse/templates/registration/password_change_done.html
@@ -0,0 +1,20 @@
+{% extends "calebasse/base.html" %}
+{% load i18n %}
+
+{% load i18n static %}
+{% block extrastyles %}
+<link rel="stylesheet" type="text/css" href="{% static "css/accounts.css" %}" />
+{% endblock extrastyles %}
+
+{% block appbar %}
+<h2>{% trans 'Password change' %}</h2>
+ <a href="../../..">Retourner à l'accueil</a>
+{% endblock %}
+
+{% block title %}{% trans 'Password change successful' %}{% endblock %}
+
+{% block content %}
+
+<p>{% trans 'Your password was changed.' %}</p>
+
+{% endblock %}
diff --git a/calebasse/templates/registration/password_change_form.html b/calebasse/templates/registration/password_change_form.html
new file mode 100644
index 0000000..5483467
--- /dev/null
+++ b/calebasse/templates/registration/password_change_form.html
@@ -0,0 +1,39 @@
+{% extends "calebasse/base.html" %}
+{% load i18n static %}
+{% block extrastyles %}
+<link rel="stylesheet" type="text/css" href="{% static "css/accounts.css" %}" />
+{% endblock extrastyles %}
+
+{% block title %}{% trans 'Password change' %}{% endblock %}
+{% block appbar %}
+<h2>{% trans 'Password change' %}</h2>
+ <a href="../..">Retourner à l'accueil</a>
+{% endblock %}
+
+{% block content %}
+<div id="password_change">
+
+ <form method="post">{% csrf_token %}
+ <div>
+ <p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
+ {% if form.errors %}
+ <p class="icon-warning errornote">
+ {% blocktrans count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
+ </p>
+ {% endif %}
+ <div class="form-row">
+ <label for="id_old_password" class="required">{% trans 'Old password' %}:</label>{{ form.old_password }} {{ form.old_password.errors }}
+ </div>
+ <div class="form-row">
+ <label for="id_new_password1" class="required">{% trans 'New password' %}:</label>{{ form.new_password1 }} {{ form.new_password1.errors }}
+ </div>
+ <div class="form-row">
+ <label for="id_new_password2" class="required">{% trans 'Password (again)' %}:</label>{{ form.new_password2 }} {{ form.new_password2.errors }}
+ </div>
+ <div class="submit-row">
+ <button>{% trans 'Change my password' %}</button>
+ </div>
+ </div>
+ </form>
+</div>
+{% endblock %}