<!-- Button trigger modal -->
<!-- Modal -->
{% load widget_tweaks %}
<div class="modal fade" id="addInfo" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header" style="color:#fff;background: #21618C">
        <h5 class="modal-title">AJOUTER UNE INFORMATION</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="#">
            {% csrf_token %}
            <div class="form-group">
                <label>Titre</label>
                {% render_field form.titre class="form-control" placeholder="Entrez le titre" %}
            </div>
            <div class="form-group">
                <label>Message</label>
                {% render_field form.message class="form-control" placeholder="Information à véhiculer" %}
            </div>
            <div class="form-group">
                <label>Cible</label>
                {% render_field form.cible class="form-control" %}
            </div>
            <div class="form-group">
                <label>UFR</label>
                <select class="form-control" name="ufr">
                    <option value="Tout">Tout</option>
                    <option value="{{UFR.code|upper}}">{{UFR.code|upper}}</option>
                </select>
            </div>
            <div class="form-group">
                <label>Date limite de diffusion</label>
                {% render_field form.limite type="date" class="form-control" %}
            </div>
            <div class="form-group">
                <label>Voulez-vous publier cette info?</label>
                {% render_field form.published type="checkbox" class="form-control" %}
            </div>

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

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