19 lines
No EOL
795 B
PHP
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> |