From 96b7c50db3acb34e3d18fe9bb63838d5a9a21560 Mon Sep 17 00:00:00 2001 From: Phil Ringnalda Date: Wed, 4 Sep 2024 20:16:25 -0700 Subject: [PATCH] Bug 37835: Saving new slot for curbside pickup fails after tab wrapper rewrite When you add a new slot for curbside pickup, the JavaScript the Add button triggers tries to look for something with the class "pickup_hours" inside something with the id "conf-{branchname}", but the bug 35838 template wrapper for the tabs changed that id to "conf-{branchname}_panel" Test plan: 1. Administration - System preferences - set CurbsidePickup to Enable 2. Administration - Curbside pickup - for Centerville add a New slot Sunday From 10:00 to 10:20 and click Add 3. Nothing happens, the slot isn't listed above the form 4. Apply patch, reload the page 5. Repeat step 2, but this time the new slot will appear above the form Sponsored-by: Chetco Community Public Library --- .../intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt index 8c557f7fdd..4ecab4dce1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/curbside_pickup.tt @@ -226,7 +226,7 @@ slots_per_day[day].push(slot); }); - $("#conf-"+branchcode).find(".pickup_hours li").remove(); + $("#conf-"+branchcode+"_panel").find(".pickup_hours li").remove(); const CalendarFirstDayOfWeek = [% Koha.Preference("CalendarFirstDayOfWeek") || 0 | html %]; [0, 1, 2, 3, 4, 5, 6] @@ -244,7 +244,7 @@ span_node.appendTo(li_node); }); - li_node.appendTo($("#conf-"+branchcode).find(".pickup_hours")); + li_node.appendTo($("#conf-"+branchcode+"_panel").find(".pickup_hours")); }); } function get_day_lib(day){ -- 2.44.0