{% if proprietaire is defined and proprietaire.id is not null %}
    {{ form_start(form, {'action': path('admin.acteurs.properties.edit', {'id': proprietaire.id}), 'method': 'POST'}) }}
{% else %}
    {{ form_start(form, {'action': path('admin.properties.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 bien
        </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-4">
                <label class="form-label">{{ form_label(form.demarcheur) }}</label>
                {{ form_widget(form.demarcheur) }}
                <a href="javascript:void(0)">{{ form_help(form.demarcheur) }}</a>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="form-label">{{ form_label(form.name) }}</label>
                    {{ form_widget(form.name) }}
                    <a href="javascript:void(0)">{{ form_help(form.name) }}</a>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="form-group">
                    <label class="form-label">{{ form_label(form.zone) }}</label>
                    {{ form_widget(form.zone) }}
                    <a href="javascript:void(0)">{{ form_help(form.zone) }}</a>
                </div>
            </div>
        </div>

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

             <div class="col-sm-4">
                <label class="form-label">{{ form_label(form.commission) }}</label>
                {{ form_widget(form.commission) }}
                <a href="javascript:void(0)">{{ form_help(form.commission) }}</a>
            </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.biens.index') }}" class="btn btn-sm btn-info">
                    <i class="icon-cross2"></i> Annuler
                </a>
             <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>