From 7afbc14912a37e4328947299f7e3055e7e7f6b4a Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 9 Jan 2015 22:11:34 +0100 Subject: Updated login forms and login template. --- pyaggr3g470r/forms.py | 2 +- pyaggr3g470r/templates/login.html | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/pyaggr3g470r/forms.py b/pyaggr3g470r/forms.py index bf6d136d..3e987082 100644 --- a/pyaggr3g470r/forms.py +++ b/pyaggr3g470r/forms.py @@ -37,7 +37,7 @@ from pyaggr3g470r.models import User class SignupForm(Form): nickname = TextField(lazy_gettext("Nickname"), [validators.Required(lazy_gettext("Please enter your nickname."))]) - email = EmailField(lazy_gettext("Email"), [validators.Length(min=6, max=35), validators.Required(lazy_gettext("Please enter your email."))]) + email = EmailField(lazy_gettext("Email"), [validators.Length(min=6, max=35), validators.Required(lazy_gettext("Please enter your email address."))]) password = PasswordField(lazy_gettext("Password"), [validators.Required(lazy_gettext("Please enter a password.")), validators.Length(min=6, max=100)]) recaptcha = RecaptchaField() submit = SubmitField(lazy_gettext("Sign up")) diff --git a/pyaggr3g470r/templates/login.html b/pyaggr3g470r/templates/login.html index 2930a8ee..ae0797a5 100644 --- a/pyaggr3g470r/templates/login.html +++ b/pyaggr3g470r/templates/login.html @@ -3,25 +3,22 @@

{{ _('Log In') }}

- - {% for message in form.email.errors %} -
{{ message }}
- {% endfor %} - - {% for message in form.password.errors %} -
{{ message }}
- {% endfor %} -
{{ form.hidden_tag() }}
{{ form.email(class_="form-control", placeholder=_('Your email')) }}
+ {% for message in form.email.errors %} + + {% endfor %}
{{ form.password(class_="form-control", placeholder=_('Your Password')) }}
+ {% for message in form.password.errors %} + + {% endfor %} {{ form.submit(class_="btn btn-default") }}
-- cgit