{% if demarcheur is defined and demarcheur.id is not null %}
    {{ form_start(form, {'action': path('admin.demarcheurs.edit', {'id': demarcheur.id}), 'method': 'POST'}) }}
{% else %}
    {{ form_start(form, {'action': path('admin.demarcheurs.new'), 'method': 'POST'}) }}
{% endif %}
{{ alert_infos('NB!', 'Tous les champs comportant un (*) sont obligatoires.') }}
<ul class="nav nav-tabs nav-tabs-highlight">
    <li class="nav-item">
        <a href="#vertical-left-infos" class="nav-link active" data-toggle="tab">
            <i class="icon-info22 mr-2"></i> Infos du démarcheur
        </a>
    </li>
    
</ul>

<div class="tab-content">
    <div class="tab-pane fade show active" id="vertical-left-infos">
        <div class="row mb-2">
            <div class="col-sm-6">
                <label class="form-label">{{ form_label(form.nom) }}</label>
                {{ form_widget(form.nom) }}
                <a href="javascript:void(0)">{{ form_help(form.nom) }}</a>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="form-label">{{ form_label(form.prenom) }}</label>
                    {{ form_widget(form.prenom) }}
                    <a href="javascript:void(0)">{{ form_help(form.prenom) }}</a>
                </div>
            </div>
            
        </div>

        <div class="row mb-2">
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="form-label">{{ form_label(form.email) }}</label>
                    {{ form_widget(form.email) }}
                    <a href="javascript:void(0)">{{ form_help(form.email) }}</a>
                </div>
            </div>
            <div class="col-sm-6">
                <div class="form-group">
                    <label class="form-label">{{ form_label(form.telephone) }}</label>
                    {{ form_widget(form.telephone) }}
                    <a href="javascript:void(0)">{{ form_help(form.telephone) }}</a>
                </div>
            </div>
            
        </div>

       
       
        <div class="row mt-2">
            <div class="col-sm-12" style="display: flex; flex-direction: row; align-items: center;">
                {{ form_widget(form.active) }}
            </div>
        </div>

        <!-- Boutons navigation - Tab 1 -->
        <div class="text-right mt-3">
              <a href="{{ path('admin.demarcheurs.index') }}" class="btn btn-sm btn-info">
                    <i class="icon-cross2"></i> Annuler
                </a>
                &nbsp;
            <button type="submit" id="sendPropertieBtn" class="btn btn-sm btn-primary"><i class="icon-floppy-disk"></i> Enregistrer</button>
        </div>
    </div>

    
</div>

{{ form_end(form) }}

<script>
function nextTab() {
    $('.nav-tabs .nav-link.active').parent().next('li').find('a').tab('show');
}

function previousTab() {
    $('.nav-tabs .nav-link.active').parent().prev('li').find('a').tab('show');
}
</script>