From 19e3bc6223d2005ff3114f39340040a18d4537f7 Mon Sep 17 00:00:00 2001
From: James McMahon <james1345@googlemail.com>
Date: Wed, 19 Nov 2014 14:42:25 +0000
Subject: [PATCH 1/2] Changed password templates to use the help text supplied
in the form definition
---
django/contrib/admin/templates/admin/auth/user/change_password.html | 3 ++-
django/contrib/admin/templates/registration/password_change_form.html | 2 ++
django/contrib/auth/forms.py | 3 ++-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/django/contrib/admin/templates/admin/auth/user/change_password.html b/django/contrib/admin/templates/admin/auth/user/change_password.html
index 8bbc448..7fb7b55 100644
a
|
b
|
|
35 | 35 | <div class="form-row"> |
36 | 36 | {{ form.password1.errors }} |
37 | 37 | {{ form.password1.label_tag }} {{ form.password1 }} |
| 38 | <p class="help">{{ form.password1.help_text }}</p> |
38 | 39 | </div> |
39 | 40 | |
40 | 41 | <div class="form-row"> |
41 | 42 | {{ form.password2.errors }} |
42 | 43 | {{ form.password2.label_tag }} {{ form.password2 }} |
43 | | <p class="help">{% trans 'Enter the same password as above, for verification.' %}</p> |
| 44 | <p class="help">{{ form.password2.help_text }}</p> |
44 | 45 | </div> |
45 | 46 | |
46 | 47 | </fieldset> |
diff --git a/django/contrib/admin/templates/registration/password_change_form.html b/django/contrib/admin/templates/registration/password_change_form.html
index 6c1118d..78b46a6 100644
a
|
b
|
|
35 | 35 | <div class="form-row"> |
36 | 36 | {{ form.new_password1.errors }} |
37 | 37 | {{ form.new_password1.label_tag }} {{ form.new_password1 }} |
| 38 | <p class="help">{{ form.new_password1.help_text }}</p> |
38 | 39 | </div> |
39 | 40 | |
40 | 41 | <div class="form-row"> |
41 | 42 | {{ form.new_password2.errors }} |
42 | 43 | {{ form.new_password2.label_tag }} {{ form.new_password2 }} |
| 44 | <p class="help">{{ form.new_password2.help_text }}</p> |
43 | 45 | </div> |
44 | 46 | |
45 | 47 | </fieldset> |
diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py
index c54a086..b982674 100644
a
|
b
|
class AdminPasswordChangeForm(forms.Form):
|
340 | 340 | password1 = forms.CharField(label=_("Password"), |
341 | 341 | widget=forms.PasswordInput) |
342 | 342 | password2 = forms.CharField(label=_("Password (again)"), |
343 | | widget=forms.PasswordInput) |
| 343 | widget=forms.PasswordInput, |
| 344 | help_text=_("Enter the same password as above, for verification.") |
344 | 345 | |
345 | 346 | def __init__(self, user, *args, **kwargs): |
346 | 347 | self.user = user |
--
1.9.4.msysgit.2
From f76d2946d5f8c5368fc26b045e6f72668abd59c7 Mon Sep 17 00:00:00 2001
From: James McMahon <james1345@googlemail.com>
Date: Wed, 19 Nov 2014 14:45:50 +0000
Subject: [PATCH 2/2] changed tabs to spaces
---
django/contrib/admin/templates/registration/password_change_form.html | 4 ++--
django/contrib/auth/forms.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/django/contrib/admin/templates/registration/password_change_form.html b/django/contrib/admin/templates/registration/password_change_form.html
index 78b46a6..aaa2009 100644
a
|
b
|
|
35 | 35 | <div class="form-row"> |
36 | 36 | {{ form.new_password1.errors }} |
37 | 37 | {{ form.new_password1.label_tag }} {{ form.new_password1 }} |
38 | | <p class="help">{{ form.new_password1.help_text }}</p> |
| 38 | <p class="help">{{ form.new_password1.help_text }}</p> |
39 | 39 | </div> |
40 | 40 | |
41 | 41 | <div class="form-row"> |
42 | 42 | {{ form.new_password2.errors }} |
43 | 43 | {{ form.new_password2.label_tag }} {{ form.new_password2 }} |
44 | | <p class="help">{{ form.new_password2.help_text }}</p> |
| 44 | <p class="help">{{ form.new_password2.help_text }}</p> |
45 | 45 | </div> |
46 | 46 | |
47 | 47 | </fieldset> |
diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py
index b982674..7aad16c 100644
a
|
b
|
class AdminPasswordChangeForm(forms.Form):
|
341 | 341 | widget=forms.PasswordInput) |
342 | 342 | password2 = forms.CharField(label=_("Password (again)"), |
343 | 343 | widget=forms.PasswordInput, |
344 | | help_text=_("Enter the same password as above, for verification.") |
| 344 | help_text=_("Enter the same password as above, for verification.") |
345 | 345 | |
346 | 346 | def __init__(self, user, *args, **kwargs): |
347 | 347 | self.user = user |