<div class="row border-bottom">
    <div class="col"><p class="lead">{{ view.titre_page }}</p></div>
</div>
<div class="row justify-content-center">
    <div class="col">
        <form action="{{ request.path }}" method="post" enctype="multipart/form-data">
            {% csrf_token %}
            {{ form.non_field_errors }}
            <table class="table table-sm table-bordered mt-3 border-bottom">
                <thead class="table-light">
                    <tr><th colspan="2" class="py-2">{{ view.titre_formulaire }}</th></tr>
                </thead>
                <tbody>
                {{ form.as_table }}
                </tbody>
            </table>
            <div id="actions" class="row border-top mt-2">
                {% if form.instance.pk %}
                <div class="col mt-3">
                    {% if view.delete_url %}
                    <button class="btn btn-sm btn-danger" name="delete" type="submit"
                        data-confirm="Voulez-vous vraiment supprimer cet objet ?"
                        formaction="{{ view.delete_url }}"
                        >Supprimer</button>
                    {% endif %}
                </div>
                {% endif %}
                <div class="col mt-3 text-end">
                    <button type="button" class="btn btn-sm btn-secondary cancel" data-bs-dismiss="modal">Annuler</button>
                    <button class="btn btn-sm btn-success" name="save" type="submit">Enregistrer</button>
                </div>
            </div>
        </form>
    </div>
</div>

