From 380d0f2952b51fa6c3d3fc1ea9866ded65e3bdae Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 3 May 2013 01:36:17 +0200 Subject: [PATCH] Update templates errors display --- templates/web/login/common/form_div_layout.html.twig | 2 +- templates/web/login/common/macros.html.twig | 1 + templates/web/login/forgot-password.html.twig | 5 +++++ templates/web/login/index.html.twig | 5 +++++ templates/web/login/oauth/login.html.twig | 5 +++++ templates/web/login/providers/bind.html.twig | 5 +++++ templates/web/login/providers/mapping.html.twig | 5 +++++ templates/web/login/register-classic.html.twig | 7 +++++-- templates/web/login/register-provider.html.twig | 5 +++++ templates/web/login/renew-password.html.twig | 5 +++++ 10 files changed, 42 insertions(+), 3 deletions(-) diff --git a/templates/web/login/common/form_div_layout.html.twig b/templates/web/login/common/form_div_layout.html.twig index 60db326676..15b63ee171 100644 --- a/templates/web/login/common/form_div_layout.html.twig +++ b/templates/web/login/common/form_div_layout.html.twig @@ -303,7 +303,7 @@ {% block widget_attributes %} {% spaceless %} id="{{ id }}" name="{{ full_name }}"{% if read_only %} readonly="readonly"{% endif %}{% if disabled %} disabled="disabled"{% endif %}{% if required %} required="required"{% endif %}{% if max_length %} maxlength="{{ max_length }}"{% endif %}{% if pattern %} pattern="{{ pattern }}"{% endif %} - {% for attrname, attrvalue in attr %}{% if attrname in ['placeholder', 'title'] %}{{ attrname }}="{{ attrvalue|trans({}, translation_domain) }}" {% else %}{{ attrname }}="{{ attrvalue }}" {% endif %}{% endfor %} + {% for attrname, attrvalue in attr %}{% if attrname in ['placeholder', 'title'] %}{{ attrname }}="{{ attrvalue|trans }}" {% else %}{{ attrname }}="{{ attrvalue }}" {% endif %}{% endfor %} {% endspaceless %} {% endblock widget_attributes %} diff --git a/templates/web/login/common/macros.html.twig b/templates/web/login/common/macros.html.twig index 35685aca35..568bfd44aa 100644 --- a/templates/web/login/common/macros.html.twig +++ b/templates/web/login/common/macros.html.twig @@ -67,6 +67,7 @@
  • {{ label | default(field.vars.label) }}
  • + {{ form_errors(field) }} {% endmacro %} {% macro providerList() %} diff --git a/templates/web/login/forgot-password.html.twig b/templates/web/login/forgot-password.html.twig index fe981f70dc..4bd2e684d9 100644 --- a/templates/web/login/forgot-password.html.twig +++ b/templates/web/login/forgot-password.html.twig @@ -30,6 +30,11 @@ method="POST" check-form-submission > +
    +
    + {{ form_errors(form) }} +
    +
    {{ auth_macro.fieldInput(form.email, "forgottenPasswordForm", "icon-envelope") }} diff --git a/templates/web/login/index.html.twig b/templates/web/login/index.html.twig index 6f8b02261d..5096b9fbab 100644 --- a/templates/web/login/index.html.twig +++ b/templates/web/login/index.html.twig @@ -44,6 +44,11 @@ action="{{ path("login_authenticate") }}" check-form-submission > +
    +
    + {{ form_errors(form) }} +
    +
    {{ auth_macro.fieldInput(form.login, "loginForm", 'icon-envelope') }} diff --git a/templates/web/login/oauth/login.html.twig b/templates/web/login/oauth/login.html.twig index 7eba175b57..2344dc6e79 100644 --- a/templates/web/login/oauth/login.html.twig +++ b/templates/web/login/oauth/login.html.twig @@ -39,6 +39,11 @@ action="{{ path("login_authenticate") }}" check-form-submission > +
    +
    + {{ form_errors(form) }} +
    +
    {{ auth_macro.fieldInput(form.email, "loginForm", 'icon-envelope') }} diff --git a/templates/web/login/providers/bind.html.twig b/templates/web/login/providers/bind.html.twig index 1e179d1d07..debc317085 100644 --- a/templates/web/login/providers/bind.html.twig +++ b/templates/web/login/providers/bind.html.twig @@ -45,6 +45,11 @@ method="POST" check-form-submission > +
    +
    + {{ form_errors(form) }} +
    +
    {{ auth_macro.fieldInput(form.login, "loginForm", 'icon-envelope') }} diff --git a/templates/web/login/providers/mapping.html.twig b/templates/web/login/providers/mapping.html.twig index 095e024ccd..4fdb453d0b 100644 --- a/templates/web/login/providers/mapping.html.twig +++ b/templates/web/login/providers/mapping.html.twig @@ -63,6 +63,11 @@ method="POST" check-form-submission > +
    +
    + {{ form_errors(form) }} +
    +