<!-- Button trigger modal -->
<!-- Modal -->
{% load widget_tweaks %}
<div class="modal fade" id="dem{{demande.id}}" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header" style="background: #3FDB7A;color:#fff;">
        <h5 class="modal-title" id="exampleModalLabel">ENVOI DE DOCUMENT</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 method="post" action="#" enctype="multipart/form-data">
            {% csrf_token %}
            <p style="font-size:20px;text-align:center;">
            </p>
            <input type="text" name="dem" value="{{demande.id}}" hidden />
            <div class="form-group">
                <label>Charger le document</label>
                {% render_field form.document class="form-control" %}
            </div>

            <div class="modal-footer">
            <button type="submit" name="valdem" class="btn btn-success"><i class="fa fa-paper-plane"></i> &nbsp;Envoyer</button>
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
          </div>

        </form>
      </div>
    </div>
  </div>
</div>