<!-- Button trigger modal -->
<!-- Modal -->
{% load widget_tweaks %}
<div class="modal fade" id="addseance" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header" style="background: #21618C;color:#fff;">
        <h5 class="modal-title" id="exampleModalLabel">
          <span>AJOUTER UNE SEANCE DE COURS</span>
        </h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
          <form action="#" method="post">
               {% csrf_token %}
              <div class="row">
                  <div class="form-group col-md-3">
                      <label style="color:#000;">Année</label>
                      {% render_field add_seance_form.annee class="form-control" %}
                  </div>
                  <div class="form-group col-md-7">
                      <label style="color:#000;">Matière</label>
                      <select class="form-control" name="adecue">
                            {% for ecue in ecues %}
                            <option value="{{ecue.id}}">{{ecue.ue.ufr.code}} - {{ecue.libelle}} ({{ecue.code}})</option>
                            {% endfor %}
                      </select>
                  </div>
                  <div class="form-group col-md-2">
                      <label style="color:#000;">Type</label>
                      {% render_field add_seance_form.type_cours class="form-control" %}
                  </div>
              </div>
              <div class="row">
                  <div class="form-group col-md-2">
                      <label style="color:#000;">Salle</label>
                      {% render_field add_seance_form.salle class="form-control" %}
                  </div>
                  <div class="form-group col-md-4">
                      <label style="color:#000;">Date</label>
                      {% render_field add_seance_form.date class="form-control" type="date" %}
                  </div>
                  <div class="form-group col-md-3">
                      <label style="color:#000;">Heure début</label>
                      {% render_field add_seance_form.debut class="form-control" type="time" %}
                  </div>
                  <div class="form-group col-md-3">
                      <label style="color:#000;">Heure fin</label>
                      {% render_field add_seance_form.fin class="form-control" type="time" %}
                  </div>
              </div><hr/>
              <div class="row">
                  <div class="form-group col-md-12">
                      <label style="color:#000;">Contenu (Cahier de texte)</label>
                      {% render_field add_seance_form.contenu class="form-control" placeholder="Remplissez ici votre cahier de text" %}
                  </div>

              </div>

              <div class="modal-footer">
                <button type="submit" name="addseancepost" class="btn btn-success">Enregistrer</button>
                <button class="btn btn-secondary" data-dismiss="modal">Annuler</button>
              </div>
          </form>
      </div>
    </div>
  </div>
</div>