From 16d0d61e39242b90eb0480928f13a79282ad40c6 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 21 Dec 2020 14:35:12 +0100 Subject: [PATCH] On utilise un vrai champ mot de passe --- shared/auth/forms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shared/auth/forms.py b/shared/auth/forms.py index be55a01..99d972a 100644 --- a/shared/auth/forms.py +++ b/shared/auth/forms.py @@ -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):