diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-11-26 02:44:31 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-11-26 02:44:31 +0300 |
commit | b161911784f9ff91c4dc9be13437b83c10e76bc8 (patch) | |
tree | 039bf676252bb7084362a97974b30fec1f8c699d /plugins | |
parent | 9210ccc9648cf3ab117c91c1cc7a3c6bf1123eb9 (diff) |
Fixes #6722 Put form errors in one template so they're in sync
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Login/templates/_formErrors.twig | 9 | ||||
-rw-r--r-- | plugins/Login/templates/login.twig | 9 | ||||
-rwxr-xr-x | plugins/Login/templates/resetPassword.twig | 10 |
3 files changed, 12 insertions, 16 deletions
diff --git a/plugins/Login/templates/_formErrors.twig b/plugins/Login/templates/_formErrors.twig new file mode 100644 index 0000000000..2eaf82c2ab --- /dev/null +++ b/plugins/Login/templates/_formErrors.twig @@ -0,0 +1,9 @@ + +{% if formErrors is defined and formErrors is not empty %} + <div class="message_error"> + {% for data in formErrors %} + <strong>{{ 'General_Error'|translate }}</strong>: {{ data|raw }} + <br/> + {% endfor %} + </div> +{% endif %} diff --git a/plugins/Login/templates/login.twig b/plugins/Login/templates/login.twig index 830b8b0f85..aca53736f6 100644 --- a/plugins/Login/templates/login.twig +++ b/plugins/Login/templates/login.twig @@ -74,13 +74,8 @@ {% include '@CoreHome/_warningInvalidHost.twig' %} {% else %} <div id="message_container"> - {% if form_data.errors %} - <div class="message_error"> - {% for data in form_data.errors %} - <strong>{{ 'General_Error'|translate }}</strong>: {{ data|raw }}<br/> - {% endfor %} - </div> - {% endif %} + + {{ include('@Login/_formErrors.twig', {formErrors: form_data.errors } ) }} {% if AccessErrorString %} <div class="message_error"> diff --git a/plugins/Login/templates/resetPassword.twig b/plugins/Login/templates/resetPassword.twig index 4a4debe91d..cd880456f7 100755 --- a/plugins/Login/templates/resetPassword.twig +++ b/plugins/Login/templates/resetPassword.twig @@ -1,12 +1,4 @@ {% if infoMessage is defined and infoMessage is not empty %} <p class="message">{{ infoMessage }}</p> {% endif %} -{% if formErrors is defined and formErrors is not empty %} - <p class="message_error"> - {% for data in formErrors %} - <strong>{{ 'General_Error'|translate }}</strong> - : {{ data }} - <br/> - {% endfor %} - </p> -{% endif %}
\ No newline at end of file +{% include '@Login/_formErrors.twig' %}
\ No newline at end of file |