Include errors in form snippet

This commit is contained in:
Ludovic Stephan 2020-06-26 16:05:35 +02:00
parent ac37431b74
commit 1fa3bdf25b
3 changed files with 14 additions and 21 deletions

View file

@ -1,8 +1,14 @@
{% load i18n %} {% load i18n %}
<form action="" method="post"> {% for error in form.non_field_errors %}
{% csrf_token %} <p class="error">{{ error }}</p>
{% include "authens/form_snippet.html" %} {% endfor %}
<input type="submit" value="{% trans submit_text %}"> <div class="auth_form {{ form_class }}">
</form> <form action="" method="post">
{% csrf_token %}
{% include "authens/form_snippet.html" %}
<input type="submit" value="{% trans submit_text %}">
</form>
</div>

View file

@ -6,12 +6,5 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% for error in form.non_field_errors %} {% include "authens/form_full_snippet.html" with form_class="oldcas" submit_text="Se connecter" %}
<p class="error">{{ error }}</p>
{% endfor %}
<div class=" auth_form oldcas">
{% include "authens/form_full_snippet.html" with submit_text="Se connecter" %}
</div>
{% endblock %} {% endblock %}

View file

@ -6,11 +6,5 @@
{% endblock %} {% endblock %}
{% block content %} {% block content %}
{% for error in form.non_field_errors %} {% include "authens/form_full_snippet.html" with form_class="exte" submit_text="Se connecter" %}
<p class="error">{{ error }}</p> {% endblock %}
{% endfor %}
<div class=" auth_form exte">
{% include "authens/form_full_snippet.html" with submit_text="Se connecter" %}
</div>
{% endblock %}