mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-04 08:13:38 +00:00
users: Clarify help message for authorization password
Closes: #2081. Tests: - In the create user form, edit user form and change password form, the message is shown as expected. - The create user form, edit user form and change password form work as expected. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
5ff7339c19
commit
136e70bbd0
@ -75,8 +75,14 @@ class PasswordConfirmForm(forms.Form):
|
||||
"""Password confirmation form."""
|
||||
confirm_password = forms.CharField(
|
||||
widget=forms.PasswordInput,
|
||||
label=gettext_lazy('Authorization Password'), help_text=gettext_lazy(
|
||||
'Enter your current password to authorize account modifications.'))
|
||||
label=gettext_lazy('Authorization Password'))
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.fields['confirm_password'].help_text = _(
|
||||
'Enter the password for user "{user}" to authorize account '
|
||||
'modifications.').format(user=self.request.user.username)
|
||||
|
||||
def clean_confirm_password(self):
|
||||
"""Check that current user's password matches."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user