From 3fddc0d73724c6c5f1aafe6842c488304b79f306 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 25 Apr 2017 13:15:13 +0000 Subject: [PATCH] Bug 17916 - "Delete MARC modification template" fails to actually delete it The MARC modification templates' 'Delete' button fails because the event handler has a "preventDefault" but the outcome of the confirmation function must return true or false. This patch removes the "preventDefault" from the .delete_template click handler as well as a redundant onclick attribute from the delete link itself. To test, apply the patch and go to Tools -> MARC modification templates. Clicking the delete button for any existing template should work correctly. Followed test plan, worked as intended Signed-off-by: Alex Buckley Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../prog/en/modules/tools/marc_modification_templates.tt | 2 +- koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt index 759c273653..6d32500eda 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -84,7 +84,7 @@ Edit actions Duplicate - Delete + Delete [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js index ffd2b7779e..8ca256be10 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js +++ b/koha-tmpl/intranet-tmpl/prog/js/marc_modification_templates.js @@ -75,8 +75,7 @@ $(document).ready(function() { } }); - $(".delete_template").on("click",function(e){ - e.preventDefault(); + $(".delete_template").on("click",function(){ return confirmDelete(); }); -- 2.39.5