confirmation using modal & csrf protected form
This commit is contained in:
parent
39b542d85b
commit
1c53bbf4d9
11 changed files with 47 additions and 10 deletions
9
issue/static/js/confirm.js
Normal file
9
issue/static/js/confirm.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
$('#confirm-delete').on('show.bs.modal', function(e) {
|
||||
var item = $(e.relatedTarget).data('item');
|
||||
if (!item) {
|
||||
item = 'item';
|
||||
}
|
||||
$('#confirm-delete-form').attr('action', $(e.relatedTarget).data('action'));
|
||||
$('#confirm-delete-title').html('Delete ' + item);
|
||||
$('#confirm-delete-message').html('Are you sure to delete this ' + item + '?');
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue