{% extends layout_data.main_layout|default:"genviews/layout.html" %}
{% load i18n %}

{% block content %}

<h1>{{ form_title }}</h1>

{{ form.non_field_errors }}

<form action="{{ form_action }}" method="post" enctype="multipart/form-data" novalidate>
    {% csrf_token %}

    {% for field in form %}
    <label class="{% if field.errors %} validate-error {% endif %}" for="{{ field.name }}">{{ field.label_tag }}</label>
    {{ field }}
    {% if field.errors %}
    <p class="error-border validate-error">
    {% for error in field.errors %}
    {{ error }}
    {% endfor %}
    </p>
       {% endif %}
    {% endfor %}

    <button type="submit">{% trans 'Valider' %}</button>
</form>

{% endblock %}
