From 1cb51d7685a4d2fb4228dbb567aa03808b721d54 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Mar 2013 15:43:01 +0100 Subject: [PATCH] Bug 4354: Manage the specific case "Unlimited" value Signed-off-by: Katrin Fischer All good :) Signed-off-by: Jared Camins-Esakov --- .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 7 +++++++ 1 file changed, 7 insertions(+) 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 7a9490ad89..a029443235 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 @@ -56,6 +56,13 @@ $(document).ready(function() { // Remove potential previous input added $(current_column).find("input").remove(); $(current_column).append(""); + } else if ( i == 2 ) { + // If the value is not an integer for "Current checkouts allowed" + // The value is "Unlimited" (or an equivalent translated string) + // an it should be set to an empty string + if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) { + $(current_column).find("input[type='text']").val(""); + } } } else { // specific processing for the Hard due date column -- 2.39.5