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 %}
{% for error in form.non_field_errors %}
<p class="error">{{ error }}</p>
{% endfor %}
<div class="auth_form {{ form_class }}">
<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 %}
{% block content %}
{% for error in form.non_field_errors %}
<p class="error">{{ error }}</p>
{% endfor %}
<div class=" auth_form oldcas">
{% include "authens/form_full_snippet.html" with submit_text="Se connecter" %}
</div>
{% include "authens/form_full_snippet.html" with form_class="oldcas" submit_text="Se connecter" %}
{% endblock %}

View file

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