{% extends 'layout.twig' %}

{% block body %}

    <div class="contenu clearfix">
    
        <h1>{{ 'Gestion des délégations' | trad }}</h1>

        {% include '@Delegation/Common/SubNavbar.twig' 
            with {
                absenceDelegations: absenceDelegations, 
                permanentDelegations: permanentDelegations, 
                items: [
                    {
                        id: 'new', 
                        label: label_route,
                        route: route,
                        badge: 0,
                    },
                ]
            } only
        %}
        
        <h2>{{ h2 }}</h2>

        <form method="post" name="permanent_deleg" id="permanent_deleg" class="clearfix box-form">
            {% include '@Delegation/PermanentDelegation/_heading.twig' %}
            <fieldset class="scheduler-border">
                <legend class="scheduler-border">{{ 'Documents' | trad }}</legend>
                <div class="single fullDiv2">
                    <ul class="nav nav-tabs sous_onglet">
                        <li class="active" id="tab_declencheurs">
                            <a data-toggle="tab" href="#declencheurs">
                                {{ 'Déclencheurs' | trad }}
                            </a>
                        </li>
                        <li id="tab_roles">
                            <a data-toggle="tab" href="#roles">
                                {{ 'Rôles' | trad }}
                            </a>
                        </li>
                    </ul>
                </div>
                <div class="tab-content">
                    <div id="declencheurs" class="tab-pane active clearfix bg_form border_form">
                        {% include '@Delegation/PermanentDelegation/_declencheurs.twig' %}
                    </div>
                    <div id="roles" class="tab-pane clearfix bg_form border_form">
                        {% include '@Delegation/PermanentDelegation/_roles.twig' %}
                    </div>
                </div>
            </fieldset>
            <button class="principal" type="button" style="float:right;" onClick="ajaxPopupV2('{{ path_validation }}', 'permanent_deleg')">
                {{ 'Enregistrer' | trad }}
            </button>
            <button class="button secondaire button_right">
                <a href="{{ path('Delegation.PermanentDelegation.index') }}">
                    {{ 'Annuler' | trad }}
                </a>
            </button>
        </form>
    </div>
    <script>
    </script>
{% endblock %}