add modal to confirm deletion of offer
This commit is contained in:
parent
07cb90e7fb
commit
54d57b2b83
1 changed files with 23 additions and 3 deletions
|
@ -20,8 +20,28 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if offer.byUser == user %}
|
{% if offer.byUser == user %}
|
||||||
<a href="{{ path('edit_offer', {'id': offer.id}) }}" class="btn btn-info"><i class="fas fa-pen"></i></a>
|
<button href="{{ path('edit_offer', {'id': offer.id}) }}" class="btn btn-info"><i class="fas fa-pen"></i></button>
|
||||||
<a href="{{ path('delete_offer', {'id': offer.id}) }}", class="btn btn-danger"><i class="fas fa-trash-alt"></i></a>
|
<button type="button" class="btn btn-danger" data-toggle="modal" data-target="#exampleModal"><i class="fas fa-trash-alt"></i></button>
|
||||||
|
<!-- Modal -->
|
||||||
|
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog" role="document">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="exampleModalLabel">Warning</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
Are you sure you want to delete this offer?
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||||
|
<a type="button" class="btn btn-danger" href="{{ path('delete_offer', {'id': offer.id}) }}">Delete</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>Wishes</h3>
|
<h3>Wishes</h3>
|
||||||
<p>{{ offer.byUser }} would like some of the following in return:</p>
|
<p>{{ offer.byUser }} would like some of the following in return:</p>
|
||||||
|
@ -40,4 +60,4 @@
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-primary">Offer trade</button>
|
<button class="btn btn-primary">Offer trade</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Reference in a new issue