mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-24 12:23:11 +00:00
Add help_text for password
This commit is contained in:
parent
1d330a2262
commit
e3c8327cd4
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,7 @@ from __future__ import unicode_literals
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.forms import ModelForm, Form
|
from django.forms import ModelForm, Form
|
||||||
from django.contrib.auth.forms import ReadOnlyPasswordHashField
|
from django.contrib.auth.forms import ReadOnlyPasswordHashField
|
||||||
from django.contrib.auth.password_validation import validate_password
|
from django.contrib.auth.password_validation import validate_password, password_validators_help_text_html
|
||||||
from django.core.validators import MinLengthValidator
|
from django.core.validators import MinLengthValidator
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.utils.functional import lazy
|
from django.utils.functional import lazy
|
||||||
|
@ -84,6 +84,7 @@ class PassForm(FormRevMixin, FieldPermissionFormMixin, forms.ModelForm):
|
||||||
label=_("New password"),
|
label=_("New password"),
|
||||||
max_length=255,
|
max_length=255,
|
||||||
widget=forms.PasswordInput,
|
widget=forms.PasswordInput,
|
||||||
|
help_text=password_validators_help_text_html()
|
||||||
)
|
)
|
||||||
passwd2 = forms.CharField(
|
passwd2 = forms.CharField(
|
||||||
label=_("New password confirmation"),
|
label=_("New password confirmation"),
|
||||||
|
@ -132,6 +133,7 @@ class UserCreationForm(FormRevMixin, forms.ModelForm):
|
||||||
label=_("Password"),
|
label=_("Password"),
|
||||||
widget=forms.PasswordInput,
|
widget=forms.PasswordInput,
|
||||||
max_length=255,
|
max_length=255,
|
||||||
|
help_text=password_validators_help_text_html()
|
||||||
)
|
)
|
||||||
password2 = forms.CharField(
|
password2 = forms.CharField(
|
||||||
label=_("Password confirmation"),
|
label=_("Password confirmation"),
|
||||||
|
@ -424,6 +426,7 @@ class AdherentCreationForm(AdherentForm):
|
||||||
label=_("Password"),
|
label=_("Password"),
|
||||||
widget=forms.PasswordInput,
|
widget=forms.PasswordInput,
|
||||||
max_length=255,
|
max_length=255,
|
||||||
|
help_text=password_validators_help_text_html()
|
||||||
)
|
)
|
||||||
password2 = forms.CharField(
|
password2 = forms.CharField(
|
||||||
required=False,
|
required=False,
|
||||||
|
|
Loading…
Reference in a new issue