clrghouz/resources/views/widgets/modal_delete.blade.php

31 lines
1017 B
PHP

<div class="modal fade" id="confirm-delete" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header bg-danger">
<h5 class="modal-title">WARNING: Deleting record</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>This action is irreversible. Are you sure, your sure, that you want to delete it?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<a type="button" class="btn btn-danger btn-ok">Delete</a>
</div>
</div>
</div>
</div>
@section('page-scripts')
<script>
var confirmdelete = new bootstrap.Modal(document.getElementById('confirm-delete'), {});
$(document).ready(function() {
$('.delete').click(function(e) {
confirmdelete.show();
$('#confirm-delete').find('.btn-ok').attr('href',e.currentTarget.href);
return false;
});
});
</script>
@append