On utilise un vrai champ mot de passe

This commit is contained in:
Tom Hubrecht 2020-12-21 14:35:12 +01:00
parent a35e81a694
commit 16d0d61e39

View file

@ -8,7 +8,11 @@ class ElectionAuthForm(forms.Form):
"""Adapts Django's AuthenticationForm to allow for an election specific login."""
login = auth_forms.UsernameField(label=_("Identifiant"), max_length=255)
password = forms.CharField(label=_("Mot de passe"), strip=False)
password = forms.CharField(
label=_("Mot de passe"),
strip=False,
widget=forms.PasswordInput(attrs={"autocomplete": "current-password"}),
)
election_id = forms.IntegerField(widget=forms.HiddenInput())
def __init__(self, request=None, *args, **kwargs):