<!-- Modal d'affichage des détails d'une reservation -->
{% load tags_personnaliser %}
<div class="modal fade" id="modalDetailReservation" tabindex="-1" aria-labelledby="modalDetailReservationLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h1 class="modal-title fs-5" id="modalDetailReservationLabel">
                  Détails de la reservation (<span id='statut-reservation'></span>)
                </h1>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form method="POST" data-urlannuler="{% url 'gestion_salle:annuler-reservation' %}" data-urlvalider="{% url 'gestion_salle:valider-reservation' %}" id="formulaire-details">
                     {% csrf_token %} 
                    <input type='hidden' class="form-control" id="id_reservation_detail" name='id_reservation'>
                    <div class="form-group mb-2">
                        <label>Employé :</label>
                        <input class="form-control" id="employe"  readonly>
                    </div>
                    <div class="form-group mb-2">
                        <label>Salle :</label>
                        <input class="form-control" id="salle"  readonly>
                    </div>
                    <div class="form-group mb-2">
                        <label>Date de debut :</label>
                        <input type='date' class="form-control" id="date_debut" readonly >
                    </div>
                    <div class="form-group mb-2">
                        <label>Date de fin :</label>
                        <input type='date' class="form-control" id="date_fin" readonly >
                    </div>
                    <div class="form-group mb-2">
                        <label>Heure de début :</label>
                        <input type='time' class="form-control" id="heure_debut" readonly>
                    </div>
                    <div class="form-group mb-2">
                        <label>Heure de fin :</label>
                        <input type='time' class="form-control" id="heure_fin" readonly >
                    </div>
                    <div class="form-group mb-2">
                        <label>Motif de la reservation :</label>
                        <textarea class="form-control"  id="motif_reservation" readonly ></textarea>
                    </div>
                    <div class="form-check mb-2">
                        <label class="form-check-label">Besoin d'un lien Zoom</label>
                        <input type="checkbox" class="form-check-input" id="besoin_zoom" readonly >
                    </div>
                    <div class="form-group mb-2" id="lien_zoom_container">
                        <label>lien Zoom :</label>
                        <input type="url" class="form-control" id="lien_zoom" readonly >
                    </div>
                    <div class="form-check mb-2">
                        <label label="form-check-label">Besoin d'un ordinateur</label>
                        <input type="checkbox" class="form-check-input" id="besoin_ordinateur" readonly >
                    </div>
                    <div class='d-flex justify-content-around mt-2'>
                        {% if appartient_au_departement_informatique %}
                        <button class="btn btn-primary" id="ajoutZoom">Ajout du lien zoom</button>
                        {% endif %}
                        {% if user|has_group:'direction' %}
                        <button class="btn btn-danger" id="refuserReservation" data-lienrefus="{% url 'gestion_salle:refuser-reservation' %}">Refuser</button>
                        <button class="btn btn-success" id="bouton-valider">Valider</button>
                        {% endif %}
                        <span id="current-user-id" data-userid="{{ request.user.id }}"></span>
                        <button class="btn btn-danger" id="bouton-annuler">Annuler</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div> 