Commit 81e70094 authored by Mat's avatar Mat
Browse files

déplace la modale dans un template inclus

parent fc3f1498
<div class="modal modal-{{ legume.id }} fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Effacer le légume n°{{ legume.id }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Cette action n'est pas réversible. Souhaitez-vous continuer ?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
<a class="btn btn-danger" role="button" href="{{ path('potage_legume_delete', {'id': legume.id }) }}">
Oui, effacer !
</a>
</div>
</div>
</div>
</div>
......@@ -62,30 +62,8 @@
<td>{{ legume.prixUnitaire }} €/{{ legume.unite }}</td>
<td>
<a class="btn btn-primary btn-sm" role="button" href="{{ path('potage_legume_update', {'id': legume.id }) }}">Editer</a>
<a class="btn btn-danger btn-sm" role="button" href="#" id="btn-{{ legume.id }}">Effacer</a>
<div class="modal modal-{{ legume.id }} fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Effacer le légume n°{{ legume.id }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Cette action n'est pas réversible. Souhaitez-vous continuer ?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Annuler</button>
<a class="btn btn-danger" role="button" href="{{ path('potage_legume_delete', {'id': legume.id }) }}">
Oui, effacer !
</a>
</div>
</div>
</div>
</div>
{% include '@Potage/Legume/delete-modal.html.twig' %}
</td>
</tr>
{% endfor %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment