From c0a5855d2fcd6760802ebc985a683eef0ffa4097 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 3 May 2018 16:31:00 +0100 Subject: [PATCH] Improve email address input on sign in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - `type='email'` on the form field - removing `autocomplete='off'` because it’s a browser feature that some people find useful --- app/main/forms.py | 2 +- app/templates/views/signin.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 342a2a6b1..ff9ab75bd 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -205,7 +205,7 @@ class StripWhitespaceStringField(StringField): class LoginForm(StripWhitespaceForm): - email_address = StringField('Email address', validators=[ + email_address = EmailField('Email address', validators=[ Length(min=5, max=255), DataRequired(message='Can’t be empty'), ValidEmail() diff --git a/app/templates/views/signin.html b/app/templates/views/signin.html index ff062927c..031ac928c 100644 --- a/app/templates/views/signin.html +++ b/app/templates/views/signin.html @@ -30,7 +30,7 @@

{% endif %} -
+ {{ textbox(form.email_address) }} {{ textbox(form.password) }} {{ page_footer("Continue", secondary_link=url_for('.forgot_password'), secondary_link_text="Forgot your password?") }}