From: Jeremy Kerr Date: Fri, 10 Dec 2010 04:24:14 +0000 (+0800) Subject: templates: use custom templates for password change X-Git-Url: https://git.ozlabs.org/?p=patchwork;a=commitdiff_plain;h=7fb5a6477b853ef758201c3d4b38cd5666b97ef3 templates: use custom templates for password change Add a couple of templates to keep the password change flow in the same look & feel as the rest of the site. Signed-off-by: Jeremy Kerr --- diff --git a/htdocs/css/style.css b/htdocs/css/style.css index 75e3000..2b9f770 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -393,7 +393,7 @@ table.form tr td.submitrow { text-align: center; } -table.registerform { +table.registerform, table.passwordform { margin-left: auto; margin-right: auto; } @@ -410,6 +410,9 @@ table.loginform { padding-left: 0.2em; margin: 0em; } +.error { + color: red; +} /* generic table with header columns on the left */ table.horizontal { diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html new file mode 100644 index 0000000..3f3061f --- /dev/null +++ b/templates/registration/password_change_done.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block title %}Password Change Complete{% endblock %} +{% block heading %}Password Change Complete{% endblock %} + +{% block body %} + +

Your password has been changed sucessfully.

+ +{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html new file mode 100644 index 0000000..8abe55e --- /dev/null +++ b/templates/registration/password_change_form.html @@ -0,0 +1,45 @@ +{% extends "base.html" %} + +{% block title %}Password Change{% endblock %} +{% block heading %}Password Change{% endblock %} + +{% block body %} + +

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.

+ +
+{% csrf_token %} + + + +{% if form.errors %} + + +{% endif %} + + +{% for field in form %} + + + + +{% endfor %} + + + + + +
Please correct the errors below.

+
{{ field.label_tag }} + {{ field.errors }} + {{ field }} +{% if field.help_text %} +
{{ field.help_text }}
+{% endif %} +
+ +
+ +
+{% endblock %}