confirmation using modal & csrf protected form

This commit is contained in:
Élie Bouttier 2014-08-16 14:23:32 -07:00
parent 39b542d85b
commit 1c53bbf4d9
11 changed files with 47 additions and 10 deletions

View 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 + '?');
});