From 7aef2f3298b0348c2a3994e344e32e5bc41f1f07 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 31 Aug 2017 21:18:24 +0000 Subject: [PATCH] Bug 19228: Trigger confirm delete when removing item from course To test: 1) Enable UseCourseReserves syspref 2) Go to Course Reserves 3) Add a new course if you don't already have one 4) Add an item to the course 5) Click 'remove' to delete the item from the course 6) Notice the item deletes straight away with no confirmation prompt 7) Apply the patch 8) Repeat steps 4 and 5 9) Confirm the confirmation box pops up and works as expected Sponsored-by: Catalyst IT Signed-off-by: Claire Gravely Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- .../prog/en/modules/course_reserves/course-details.tt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt index 3e6f8c3a4b..e07cbe538e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/course-details.tt @@ -18,8 +18,8 @@ ] })); - $("a.delete_item").click(function(){ - return confirm( _("Are you sure you want to remove this item from the course?")); + $(".delete_item").click(function(){ + return confirmDelete(_("Are you sure you want to remove this item from the course?")); }); $("#delete_course").click(function(){ @@ -207,11 +207,11 @@ [% IF CAN_user_coursereserves_delete_reserves %] [% IF cr.item.onloan %] - + [% ELSIF cr.item.itemlost %] - + [% ELSE %] - + [% END %] Remove [% END %] -- 2.39.5