8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-23 11:53:12 +00:00

Add help_text for password

This commit is contained in:
Gabriel Detraz 2020-04-19 22:40:49 +02:00
parent c19723375b
commit 0d7ca44edd

View file

@ -38,7 +38,7 @@ from __future__ import unicode_literals
from django import forms
from django.forms import ModelForm, Form
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.utils import timezone
from django.utils.functional import lazy
@ -84,6 +84,7 @@ class PassForm(FormRevMixin, FieldPermissionFormMixin, forms.ModelForm):
label=_("New password"),
max_length=255,
widget=forms.PasswordInput,
help_text=password_validators_help_text_html()
)
passwd2 = forms.CharField(
label=_("New password confirmation"),
@ -132,6 +133,7 @@ class UserCreationForm(FormRevMixin, forms.ModelForm):
label=_("Password"),
widget=forms.PasswordInput,
max_length=255,
help_text=password_validators_help_text_html()
)
password2 = forms.CharField(
label=_("Password confirmation"),
@ -424,6 +426,7 @@ class AdherentCreationForm(AdherentForm):
label=_("Password"),
widget=forms.PasswordInput,
max_length=255,
help_text=password_validators_help_text_html()
)
password2 = forms.CharField(
required=False,