<!-- Button trigger modal -->
<!-- Modal -->
{% load widget_tweaks %}
<div class="modal fade" id="addService{{item.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">AFFECTER A UN SERVICE</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="row">
                    <div class="col-md">
                        <label>Année</label>
                        <div>{% render_field form2.annee class+="form-control" %}</div>
                    </div>
                </div><br/>
                <div class="row">
                    <div class="col-md">
                        <label>Service</label>
                        <div>{% render_field form2.service class+="form-control" %}</div>
                    </div>
                </div><br/>
                <div class="row">
                     <div class="col-md">
                        <label>Date de prise de service</label>
                        <div>{% render_field form2.prise_de_fonction class+="form-control" type="date" %}</div>
                    </div>
                </div>
                <input type="text" name="personnel" value="{{item.id}}" hidden />

                <hr/>

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