vmailadmin/resources/views/vendor/laravelusers/scripts/delete-modal-script.blade.php
2020-05-23 15:20:01 +02:00

17 lines
613 B
PHP

{{-- Confirm Delete Modal --}}
<script type="text/javascript">
$(document).ready(function(){
$('#confirmDelete').on('show.bs.modal', function (e) {
var message = $(e.relatedTarget).attr('data-message');
var title = $(e.relatedTarget).attr('data-title');
var form = $(e.relatedTarget).closest('form');
$(this).find('.modal-body p').text(message);
$(this).find('.modal-title').text(title);
$(this).find('.modal-footer #confirm').data('form', form);
});
$('#confirmDelete').find('.modal-footer #confirm').on('click', function(){
$(this).data('form').submit();
});
});
</script>