mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 18:38:26 +02:00
Add confirmation modal before aborting a draw
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -54,12 +54,6 @@
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
Recap
|
||||
{% if user.registration.is_volunteer %}
|
||||
{# Volunteers can click on this button to abort the draw #}
|
||||
<button id="abort-{{ tournament.id }}" class="badge rounded-pill text-bg-danger" onclick="abortDraw({{ tournament.id }})">
|
||||
{% trans "Abort" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="recap-{{ tournament.id }}-round-list" class="row">
|
||||
@ -327,3 +321,32 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if user.registration.is_volunteer %}
|
||||
{# Volunteers can click on this button to abort the draw #}
|
||||
<div class="text-center mt-3">
|
||||
<button id="abort-{{ tournament.id }}" class="badge rounded-pill text-bg-danger" data-bs-toggle="modal" data-bs-target="#abort{{ tournament.id }}Modal">
|
||||
{% trans "Abort" %}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div id="abort{{ tournament.id }}Modal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{% trans "Are you sure?" %}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
{% trans "This will reset the draw from the beginning." %}
|
||||
{% trans "This operation is irreversible." %}
|
||||
{% trans "Are you sure you want to abort this draw?" %}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-danger" onclick="abortDraw({{ tournament.id }})">{% trans "Abort" %}</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Close" %}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user