From c926adeba39eb4011ac299982a45f7093d4b5c07 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 --- koha-tmpl/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 7a9490a..a029443 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 -- 1.7.10.4