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" %}
<script>
$('#modal-confirm').on('show.bs.modal', function(event) {
var button = $(event.relatedTarget);
var name = button.data('name');
var url = button.data('href');
var kind = button.data('kind');
const b = $(event.relatedTarget);
var modal = $(this);
modal.find('.modal-title').text(`Enlever un ${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-footer a').prop('href', url);
const modal = $(this);
modal.find('.modal-title').text(`Enlever un ${b.data('kind')}`);
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', b.data('href'));
});
</script>