From bbd644444f0fb344922112dd447c18a4a86525d7 Mon Sep 17 00:00:00 2001 From: wainuiwitikapark Date: Tue, 10 Sep 2024 03:06:15 +0000 Subject: [PATCH] Bug 37838: Fix broken remove button in course reserves To test: 1) Go to staff client -> Course reserves 2) Create a course or go to an existing course 3) Add reserves to the course (will need at least 21 items to be able to go to a second page of results) 4) Go to the second page of results on the course details page 5) Click the Remove button next to a result 6) Notice how the button just makes the page move to the top 7) Apply patch 8) Repeat steps 1-5 9) Notice how the remove button is working as expected Sponsored-by: Toi Ohomai Institute of Technology Signed-off-by: Sam Sowanick Signed-off-by: Laura_Escamilla Signed-off-by: Katrin Fischer --- .../prog/en/modules/course_reserves/course-details.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 27cb90917c..929db917c3 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 @@ -341,7 +341,7 @@ "autoWidth": false, }, table_settings ); - $(".delete_item").on( 'click', function(e){ + $("#course_reserves_table").on( 'click', " .delete_item", function(e){ e.preventDefault(); if (confirmDelete(_("Are you sure you want to remove this item from the course?") )) { cr_id = $(this).data('cr-id'); -- 2.39.5