From 85708d944f5ba24228feb47f879b8d97ee49a6d1 Mon Sep 17 00:00:00 2001 From: Petro Vashchuk Date: Thu, 18 Jul 2024 15:43:23 +0300 Subject: [PATCH] Bug 37401: Fix incorrect index in smart-rules.tt This patch corrects the index for the "Current checkouts allowed" column. To reproduce: 1. Go to Administration -> Circulation and Fine Rules. 2. Add or edit a rule so that "Current checkouts allowed" and "Current on-site checkouts allowed" are set to "Unlimited." 3. Press the edit button to edit that rule, and see that the text edit field for "Current on-site checkouts allowed" is empty, as it should be, while "Current checkouts allowed" has a prefilled text value "Unlimited". 4. Apply the patch. 5. Repeat the third step and ensure that this time when you edit that rule, both text edit fields for "Current checkouts allowed" and "Current on-site checkouts allowed" are correctly empty. Signed-off-by: Roman Dolny --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index d786284c3e..e63044f794 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -1563,7 +1563,7 @@ // Remove potential previous input added $(current_column).find("input").remove(); $(current_column).append(""); - } else if ( i == 5 || i == 6 || i == 26 || i == 27 || i == 28 || current_input_id === "holds_pickup_period" ) { + } else if ( i == 4 || i == 5 || i == 26 || i == 27 || i == 28 || current_input_id === "holds_pickup_period" ) { // If the value is not an integer for // - "Current checkouts allowed" // - "Current on-site checkouts allowed" -- 2.39.2