Commit 4d439bbe by Chris Dodge

add a confirmation when deleting components

parent 57df2089
......@@ -117,6 +117,8 @@ class CMS.Views.UnitEdit extends Backbone.View
@model.save()
deleteComponent: (event) =>
if not confirm 'Are you sure you want to delete this component? This action cannot be undone.'
return
$component = $(event.currentTarget).parents('.component')
$.post('/delete_item', {
id: $component.data('id')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment