mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-08-07 07:19:49 +02:00
Ajout de la pop-up de validation de défi
This commit is contained in:
@@ -116,7 +116,7 @@ class FamilyAchievementTable(tables.Table):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Achievement
|
model = Achievement
|
||||||
template_name = 'django_tables2/bootstrap4.html'
|
template_name = 'django_tables2/bootstrap4.html'
|
||||||
fields = ('challenge', 'challenge__points', 'obtained_at',)
|
fields = ('challenge', 'challenge__points', 'obtained_at', 'valid')
|
||||||
attrs = {
|
attrs = {
|
||||||
'class': 'table table-condensed table-striped table-hover'
|
'class': 'table table-condensed table-striped table-hover'
|
||||||
}
|
}
|
||||||
|
@@ -159,6 +159,34 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
{% render_table table %}
|
{% render_table table %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Popup de validation -->
|
||||||
|
<div class="modal fade" id="validationModal" tabindex="-1" role="dialog" aria-labelledby="validationModalLabel" aria-hidden="true">
|
||||||
|
<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>
|
||||||
|
<button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</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:</strong> +33 6 30 21 12 44</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-primary" data-dismiss="modal">{% trans "OK" %}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
@@ -178,4 +206,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
|||||||
});
|
});
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
document.getElementById("consume_all").addEventListener("click", function () {
|
||||||
|
$('#validationModal').modal('show');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Reference in New Issue
Block a user