0003-use-new-password-widget-in-manager-25045.patch
src/authentic2/manager/forms.py | ||
---|---|---|
12 | 12 |
from authentic2.compat import get_user_model |
13 | 13 |
from authentic2.passwords import generate_password |
14 | 14 |
from authentic2.utils import send_templated_mail |
15 |
from authentic2.forms.fields import NewPasswordField, CheckPasswordField |
|
15 | 16 | |
16 | 17 |
from django_rbac.models import Operation |
17 | 18 |
from django_rbac.utils import get_ou_model, get_role_model, get_permission_model |
... | ... | |
288 | 289 |
initial=False, |
289 | 290 |
label=_('Generate new password'), |
290 | 291 |
required=False) |
291 |
password1 = forms.CharField(
|
|
292 |
password1 = NewPasswordField(
|
|
292 | 293 |
label=_("Password"), |
293 |
widget=forms.PasswordInput, |
|
294 | 294 |
required=False) |
295 |
password2 = forms.CharField(
|
|
295 |
password2 = CheckPasswordField(
|
|
296 | 296 |
label=_("Confirmation"), |
297 |
widget=forms.PasswordInput, |
|
298 |
help_text=_("Enter the same password as above, for verification."), |
|
299 | 297 |
required=False) |
300 | 298 |
send_mail = forms.BooleanField( |
301 | 299 |
initial=True, |
src/authentic2/manager/templates/authentic2/manager/form.html | ||
---|---|---|
44 | 44 |
{{ field.label_tag }} |
45 | 45 |
{{ field }} |
46 | 46 |
{% if field.help_text %} |
47 |
<span class="helptext">{{ field.help_text }}</span> |
|
47 |
<span class="helptext">{{ field.help_text|safe }}</span>
|
|
48 | 48 |
{% endif %} |
49 | 49 |
{% if field.errors %} |
50 | 50 |
<ul class="errorlist"> |
51 |
- |