{% extends '@CadolesCore/base.html.twig' %}

{% block pagewrapper %}
{{ form_start(form) }}
    <h1 class="page-header">
    {% if mode=="update" %}
    Modification {{ labelniveau02 }} = {{niveau02.label}}
    {% elseif mode=="submit" %}
    Création {{ labelniveau02 }}
    {% elseif mode=="delete" %}
    Suppression {{ labelniveau02 }} = {{niveau02.label}}
    {% endif %}
    </h1>

    {{ form_widget(form.submit) }} <a class="btn btn-default" href={{ path('cadoles_core_config_niveau02') }}>Annuler</a>

    <br><br>

    {% if app.session.flashbag.has('error') %}
        <div class='alert alert-danger' style='margin: 5px 0px'>
            <strong>Erreur</strong><br>
            {% for flashMessage in app.session.flashbag.get('error') %}
                {{ flashMessage }}<br>
            {% endfor %}
        </div>
    {% endif %}

    {% if app.session.flashbag.has('notice') %}
        <div class='alert alert-info' style='margin: 5px 0px'>
            <strong>Information</strong><br>
            {% for flashMessage in app.session.flashbag.get('notice') %}
                {{ flashMessage }}<br>
            {% endfor %}
        </div>
    {% endif %}
    <div class="panel panel-primary">
        <div class="panel-heading">
            <i class="fa fa-pencil fa-fw"></i> Informations
        </div>

        <div class="panel-body">
            {{ form_row(form.niveau01) }}
            {{ form_row(form.label) }}
            <div class='alert alert-info' style='font-size: 80%;padding: 5px;margin-top: -10px;'>
                Caractères interdits = caractères spéciaux sauf ' @ . - _<br>
            </div>

            {{ form_row(form.siret) }}
            {{ form_row(form.postaladress) }}
        </div>
    </div>
{{ form_end(form) }}
{% endblock %}

{% block localjavascript %}
{% endblock %}
