1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-08-14 17:59:45 +02:00

Achievement unicity && management pop-up behaviour

This commit is contained in:
Ehouarn
2025-08-13 23:57:05 +02:00
parent 61057b71ba
commit 4d567cdcc7
6 changed files with 111 additions and 47 deletions

View File

@@ -177,25 +177,27 @@ SPDX-License-Identifier: GPL-3.0-or-later
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content border-success">
<div class="modal-header bg-success text-white">
<h5 class="modal-title" id="validationModalLabel">{% trans "Challenge validated" %}</h5>
<h5 class="modal-title" id="validationModalLabel">{% trans "Confirmation" %}</h5>
<button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p><strong>Are you sure you want to validate this challenge?</strong></p>
<p>To have your challenge officially validated, please send a message with:</p>
<ul>
<li>The name of the family</li>
<li>The name of the challenge</li>
<li>A photo or video as proof</li>
</ul>
<p>
<strong>Send it via WhatsApp to:
{% for num in phone_numbers %}
<a href="https://wa.me/{{ num }}" target="_blank">{{ num }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
</p>
<p><strong>{% trans "Are you sure you want to validate this challenge?" %}</strong></p>
<p>{% trans "To have your challenge officially validated, please send a message with:" %}</p>
<ul>
<li>{% trans "The name of the family" %}</li>
<li>{% trans "The name of the challenge" %}</li>
<li>{% trans "A photo or video as proof" %}</li>
</ul>
<p>
<strong>{% trans "Send it via WhatsApp to:" %}</strong>
{% if phone_numbers %}"
{% for num in phone_numbers %}
<a href="https://wa.me/{{ num }}" target="_blank">{{ num }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endif %}
</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">{% trans "OK" %}</button>
@@ -227,6 +229,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
document.getElementById("consume_all").addEventListener("click", function () {
$('#validationModal').modal('show');
});
$('#validationModal .btn-primary').on('click', function () {
consumeAll();
});
{% if user_family %}
document.getElementById("select_my_family").addEventListener("click", function () {