From 9ccfc2981dfcefb66f0fecf9364df9f4035bd9f1 Mon Sep 17 00:00:00 2001 From: Glandos Date: Thu, 27 Oct 2022 22:26:13 +0200 Subject: [PATCH] side-effect: add autofocus on admin field --- ihatemoney/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index c4fc32a8..e9973fdd 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -295,7 +295,9 @@ class AuthenticationForm(FlaskForm): class AdminAuthenticationForm(FlaskForm): - admin_password = PasswordField(_("Admin password"), validators=[DataRequired()]) + admin_password = PasswordField( + _("Admin password"), validators=[DataRequired()], render_kw={"autofocus": True} + ) submit = SubmitField(_("Get in"))