fix: 💬 fix formatting and text on password fields in signup

This commit is contained in:
m5ka 2024-03-25 17:23:02 +00:00
parent e1fca230c8
commit f168deb655
2 changed files with 4 additions and 8 deletions

View file

@ -16,14 +16,10 @@ class UserForm(UserCreationForm):
labels = {
"username": _("username"),
"email": _("email address"),
"password1": _("password"),
"password2": _("password (again)"),
}
help_texts = {
"username": User._meta.get_field("username").help_text,
"email": User._meta.get_field("email").help_text,
"password1": _("make a secure password that you've never used before!"),
"password2": _("just type the password again to confirm"),
}
def __init__(self, *args, **kwargs):

View file

@ -16,14 +16,14 @@
<span class="help">{{ form.email.help_text }}</span>
</div>
<div class="field">
<label for="id_password1">{{ form.password1.label }}</label>
<label for="id_password1">{% trans %}password{% endtrans %}</label>
<input type="password" name="password1" id="id_password1" required>
<span class="help">{{ form.password1.help_text|safe }}</span>
<span class="help">{% trans %}make a secure password that you've never used before!{% endtrans %}</span>
</div>
<div class="field">
<label for="id_password2">{{ form.password2.label }}</label>
<label for="id_password2">{% trans %}password (again){% endtrans %}</label>
<input type="password" name="password2" id="id_password2" required>
<span class="help">{{ form.password2.help_text }}</span>
<span class="help">{% trans %}just type the password again to confirm.{% endtrans %}</span>
</div>
<div class="field">
<label for="id_captcha">captcha</label>