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 8bbc4484c0..bfffd2a77b 100644 --- a/django/contrib/admin/templates/admin/auth/user/change_password.html +++ b/django/contrib/admin/templates/admin/auth/user/change_password.html @@ -35,12 +35,17 @@
{{ form.password1.errors }} {{ form.password1.label_tag }} {{ form.password1 }} + {% if form.password1.help_text %} +

{{ form.password1.help_text }}

+ {% endif %}
{{ form.password2.errors }} {{ form.password2.label_tag }} {{ form.password2 }} -

{% trans 'Enter the same password as above, for verification.' %}

+ {% if form.password2.help_text %} +

{{ form.password2.help_text }}

+ {% endif %}
diff --git a/django/contrib/admin/templates/registration/password_change_form.html b/django/contrib/admin/templates/registration/password_change_form.html index 6c1118de00..1e641dcc09 100644 --- a/django/contrib/admin/templates/registration/password_change_form.html +++ b/django/contrib/admin/templates/registration/password_change_form.html @@ -35,11 +35,17 @@
{{ form.new_password1.errors }} {{ form.new_password1.label_tag }} {{ form.new_password1 }} + {% if form.new_password1.help_text %} +

{{ form.new_password1.help_text }}

+ {% endif %}
{{ form.new_password2.errors }} {{ form.new_password2.label_tag }} {{ form.new_password2 }} + {% if form.new_password2.help_text %} +

{{ form.new_password2.help_text }}

+ {% endif %}
diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py index 86cfa291c9..d410bbb9bc 100644 --- a/django/contrib/auth/forms.py +++ b/django/contrib/auth/forms.py @@ -337,10 +337,15 @@ class AdminPasswordChangeForm(forms.Form): 'password_mismatch': _("The two password fields didn't match."), } required_css_class = 'required' - password1 = forms.CharField(label=_("Password"), - widget=forms.PasswordInput) - password2 = forms.CharField(label=_("Password (again)"), - widget=forms.PasswordInput) + password1 = forms.CharField( + label=_("Password"), + widget=forms.PasswordInput, + ) + password2 = forms.CharField( + label=_("Password (again)"), + widget=forms.PasswordInput, + help_text=_("Enter the same password as above, for verification."), + ) def __init__(self, user, *args, **kwargs): self.user = user