JS update

This commit is contained in:
Tom Hubrecht 2021-10-11 15:34:24 +02:00
parent 0fa182cb4a
commit f257209f8f

View file

@ -193,15 +193,12 @@
{% addtoblock "js" %} {% addtoblock "js" %}
<script> <script>
$('#modal-confirm').on('show.bs.modal', function(event) { $('#modal-confirm').on('show.bs.modal', function(event) {
var button = $(event.relatedTarget); const b = $(event.relatedTarget);
var name = button.data('name');
var url = button.data('href');
var kind = button.data('kind');
var modal = $(this); const modal = $(this);
modal.find('.modal-title').text(`Enlever un ${kind}`); modal.find('.modal-title').text(`Enlever un ${b.data('kind')}`);
modal.find('.modal-body').html(`Enlever <span class="font-weight-bold font-italic">${name}</span> en tant que ${kind} du groupe {{ wikigroup }} ?`); modal.find('.modal-body').html(`Enlever <span class="font-weight-bold font-italic">${b.data('name')}</span> en tant que ${b.data('kind')} du groupe {{ wikigroup }} ?`);
modal.find('.modal-footer a').prop('href', url); modal.find('.modal-footer a').prop('href', b.data('href'));
}); });
</script> </script>