{% extends 'default/form.html.twig' %}
{% block content %}
{{ form_start(form, {'attr': {'class': 'form-horizontal', 'enctype' : 'multipart/form-data'}}) }}
{# Section to insert Main Data #}
{% for item in form %}
{# Message d'erreur ou d'information #}
{% if item.vars.name starts with 'Message-alert' %}
{{ form_label(item) }} {{ form_widget(item) }}
{% endif %}
{% if item.vars.attr is not empty %}
{% if item.vars.attr['data-type'] starts with 'main-' %}
{% if item.vars.attr['data-type'] == 'main-level-geo' or item.vars.attr['data-type'] == 'main-restriction' %} {# Insert the geo access level#}
{# Section to insert Annex Data #}
{% if hasAnnex == true %}
{{ 'Form.Annex.Section' | trans }}
{% for item in form %}
{% if item.vars.attr is not empty %}
{% if item.vars.attr['data-type'] starts with 'annex-' %}
{% if item.vars.attr['data-type'] == 'annex-checkbox' %}
{% if item.vars.attr['entries-nb'] > 4 %}
{% else %}
{% endif %}
{% for t in item %}
{{ form_widget(t, {'attr': {'class': ''}}) }} {{ form_label(t) }}
{% endfor %}
{{ form_errors(item) }}{{ form_help(item) }}