<!-- Button trigger modal -->
<!-- Modal -->
{% load custom_tag %}
{% load custom_tag_obj %}
{% load widget_tweaks %}
<div class="modal fade" id="addSupp{{typCour.id}}" 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 UN SUPPORT</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" enctype="multipart/form-data">
               {% csrf_token %}
                <div class="form-group">
                    <label>Nom de Fichier</label>
                    {% render_field form3.libelle class="form-control" placeholder="Nom du fichier" %}
                </div>

              <div class="form-group">
                    <label>Fichier</label>
                    {% render_field form3.fichier class="form-control" %}
                </div>
              <input type="text" value="{{typCour.id}}" name="obj" hidden>

              <div class="modal-footer">
                <button type="submit" name="addSupportBtn" class="btn btn-success">Enregistrer</button>
                <button class="btn btn-secondary" data-dismiss="modal">Annuler</button>
              </div>
          </form>
          <hr/>
          <div style="color:red;text-align:center;">LISTE DES FICHIERS JOINTS</div>
          <ol>
              {% if 'pub_list' in request.path %}
                  {% for file in typCour.id|get_pub_cours_file:'p' %}
                    <li>{{file}}</li>
                  {% endfor %}
              {% else %}
                {% for file in typCour.id|get_pub_cours_file:'c' %}
                    <li>{{file}}</li>
                  {% endfor %}
              {% endif %}
          </ol>
      </div>
    </div>
  </div>
</div>