From 79332bcfda0c908bdb31da7c4abc0fbed367671e Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 14 Oct 2023 14:41:35 +0000 Subject: [PATCH] Bug 8367: Make sure "Default" is not copied when editing circulation rules When editing a circulation rules the "Default" was copied into the input field. This would cause problems on saving and especially with translations. So now the field will be empty and appear as "Default" after saving as we already do it for other values with "unlimited". Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 23c57d925e..a54cc7bf94 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 @@ -1536,14 +1536,15 @@ // 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 ) { + } else if ( i == 5 || i == 6 || i == 26 || i == 27 || i == 28 || i = 31 ) { // If the value is not an integer for // - "Current checkouts allowed" // - "Current on-site checkouts allowed" // - "Holds allowed (total)" // - "Holds allowed (daily)" // - "Holds per record (count)" - // The value is "Unlimited" (or an equivalent translated string) + // - "Holds pickup period (days)" + // The value is "Unlimited" or "Default" (or an equivalent translated string) // an it should be set to an empty string if( !((parseFloat(itm_text) == parseInt(itm_text)) && !isNaN(itm_text)) ) { $(current_column).find("input[type='text']").val(""); -- 2.30.2