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

19 lines
No EOL
795 B
PHP

{{-- Confirm Save Modal --}}
<script type="text/javascript">
$(document).ready(function(){
$('#confirmSave').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);
console.info("Showing modal. Debug info:",$(this).find('.modal-footer #confirm'),$(this).find('.modal-footer #confirm')[0],form);
});
$('#confirmSave').find('.modal-footer #confirm').on('click', function(){
console.info("Save confirmed. Debug info:",this);
$(this).data('form').submit();
});
});
</script>