{% block body %}
    <div>
        <div>
            <ul class="nav nav-tabs sous_onglet sous_onglet_filter" id="filterTab">
                <li class="active" id="tab_filter">
                    <a data-toggle="tab" href="#filtre">{{ 'Filtres' | trad }}</a>
                </li>
                <li id="tab_advance">
                    <a data-toggle="tab" href="#filtreAdvance">{{ 'Filtres complémentaires' | trad }}</a>
                </li>
            </ul>
            {{ initTabFilter(post, 'filterTab') }}
        </div>
        <div class="tab-content px-base">
            <div id="filtre" class="tab-pane active in box-form bs-row gutter-x-base">
                {% if form.filter_typeFourniss %}
                <div class="bs-col-quarter">
                    {{ formInput(form.filter_typeFourniss, post, 'Short list' | trad) }}
                </div>
                {% endif %}
                <div class="bs-col-quarter">
                    {{ formInput(form.filter_valid, post, 'Validité' | trad) }}
                </div>
                <div class="bs-col-quarter">
                    {{ formInput(form.filter_recherche, post, 'Recherche' | trad) }}
                </div>
                <div class="bs-col-quarter ml-auto">
                    <button type="submit" class="principal button btn_filtre last button_right">
                        {{ 'Filtrer' | trad }}
                    </button>
                    <button class="secondaire button ajout button_right " id="buttonCollapseFA" data-toggle="collapse" href="#filtre_avances" style="padding-right: 4%;">
                        {{ 'Filtres avancés' | trad }}
                    </button>
                    <input type="hidden" id="retract" value="{{ 'Retracter' | trad }}">
                    <input type="hidden" id="advancedFilters" value="{{ 'Filtres avancés' | trad }}">
                </div>
            </div>
            <div id="filtreAdvance" class="tab-pane fade clearfix box-form">
                <div class="filtre first">
                    <div class="row">
                        {{ formInput(form.filter_sousFamille, post, 'Sous-famille' | trad) }}
                    </div>
                </div>
                <div class="filtre">
                    <div class="row">
                        {{ formInput(form.filter_motclef, post, 'Mots clés' | trad) }}
                    </div>
                </div>
                <div class="filtre">
                    <div class="row">
                        {{ formInput(form.filter_article, post, 'Article' | trad) }}
                    </div>
                </div>
                <div class="filtre last">
                    <div class="row">
                        {{ formInput(form.filter_typeAchat, post, 'Type d\'achat' | trad) }}
                    </div>
                </div>
                <div class="filtre first">
                    <div class="row">
                        {{ formInput(form.filter_DOMAINE, post, 'Domaine de comp.' | trad) }}
                    </div>
                </div>
                <div class="filtre">
                    <div class="row">
                        {{ formInput(form.RAT_PART, post, 'Rattaché à un partenaire ?' | trad) }}
                    </div>
                </div>
                 <div class="filtre">
                    <div class="row">
                        {{ formInput(form.filter_accordCadre, post, 'Accord Cadre' | trad) }}
                    </div>
                </div>
                <button type="submit" class="principal button btn_filtre last button_right" style="margin-top:10px;">{{ 'Filtrer' | trad }}</button>
                <button class="secondaire button ajout button_right " id="buttonCollapseFA" data-toggle="collapse" href="#filtre_avances" style="margin-top:10px;">
                    {{ 'Filtres avancés' | trad }}
                </button>
                <input type="hidden" id="retract" value="{{'Retracter' | trad}}">
                <input type="hidden" id="advancedFilters" value="{{ 'Filtres avancés' | trad }}">
            </div>
        </div>

        <div id="filtre_avances" class="collapse clearfix">
            {{ filtreAvance(post, filtreAvance, initFiltreAvance) }}
        </div>
        <div class="resultat_filtre">
            {{ bullFiltre(post, form_id) }}
        </div>
    </form>
{% endblock %}
