From e8e5f44c9dbe72dced3bbd2cf0df41181505e285 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 27 Oct 2017 11:12:57 -0300 Subject: [PATCH] Bug 19539: Fix column index shift in cirulation rules This patch fixes an index shift introduced by bug 18857 when it introduced a new column. To test: - On the Circulation and fine rules page - Empty the value of 'Current on-site checkouts allowed' and save - Notice 'Unlimited' shows on the saved rule. - Click edit => FAIL: the 'Unlimited' string displays instead of the empty string on the editing row. - Apply this patch - Re-open the circ rules page - Click edit => SUCCESS: An empty string fills the 'Unlimited' fields - Sign off :-D Signed-off-by: David Bourgault --- 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 bfec588..c1d5931 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 @@ -103,7 +103,7 @@ $(document).ready(function() { // Remove potential previous input added $(current_column).find("input").remove(); $(current_column).append(""); - } else if ( i == 2 || i == 3 ) { + } else if ( i == 3 || i == 4 ) { // If the value is not an integer for "Current checkouts allowed" or "Current on-site checkouts allowed" // The value is "Unlimited" (or an equivalent translated string) // an it should be set to an empty string -- 2.7.4