# HG changeset patch # User Madhusudan.C.S # Date 1296415584 -19800 # Node ID 1f08247a935c2a5fa5f8225738f743f0634cc280 # Parent 13eba81f3aa1758cdc52e7b74f9946d128532c6b Use the form helpers templatetags instead of hard coding forms. diff -r 13eba81f3aa1 -r 1f08247a935c pytask/templates/registration/password_change_form.html --- a/pytask/templates/registration/password_change_form.html Mon Jan 31 00:55:41 2011 +0530 +++ b/pytask/templates/registration/password_change_form.html Mon Jan 31 00:56:24 2011 +0530 @@ -1,23 +1,15 @@ {% extends "base.html" %} +{% load i18n %} +{% load form_helpers %} + {% block title %}{% trans 'Password change' %}{% endblock %} {% block content %} -

{% trans 'Password change' %}

+

{% trans 'Password Change' %}

{% 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." %}

-
-{% csrf_token %} -{{ form.old_password.errors }} -

{{ form.old_password }}

-{{ form.new_password1.errors }} -

{{ form.new_password1 }}

-{{ form.new_password2.errors }} -

{{ form.new_password2 }}

- -

-
- +{% as_div_form form "Password Change Form" csrf_token "Change password" %} {% endblock %} diff -r 13eba81f3aa1 -r 1f08247a935c pytask/templates/registration/password_reset_confirm.html --- a/pytask/templates/registration/password_reset_confirm.html Mon Jan 31 00:55:41 2011 +0530 +++ b/pytask/templates/registration/password_reset_confirm.html Mon Jan 31 00:56:24 2011 +0530 @@ -1,5 +1,8 @@ {% extends "base.html" %} + + {% load i18n %} +{% load form_helpers %} {% block breadcrumbs %}{% endblock %} @@ -13,15 +16,7 @@

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

-
-{% csrf_token %} -{{ form.new_password1.errors }} -

{{ form.new_password1 }}

-{{ form.new_password2.errors }} -

{{ form.new_password2 }}

-

-
- +{% as_div_form form "Password Change Form" csrf_token "Change password" %} {% else %}

{% trans 'Password reset unsuccessful' %}

diff -r 13eba81f3aa1 -r 1f08247a935c pytask/templates/registration/password_reset_form.html --- a/pytask/templates/registration/password_reset_form.html Mon Jan 31 00:55:41 2011 +0530 +++ b/pytask/templates/registration/password_reset_form.html Mon Jan 31 00:56:24 2011 +0530 @@ -1,5 +1,8 @@ {% extends "base.html" %} + + {% load i18n %} +{% load form_helpers %} {% block breadcrumbs %}{% endblock %} @@ -11,10 +14,6 @@

{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}

-
-{% csrf_token %} -{{ form.email.errors }} -

{{ form.email }}

-
+{% as_div_form form "Password Reset Email" csrf_token "Email instructions" %} {% endblock %}