From 03037344fa4f1e58d00016bfcb15b7403eed5328 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Mar 2013 12:32:43 +0100 Subject: [PATCH] Bug 4354: Followup: FIX the hardduedate copy Before this patch, the copy was based on the string (could be translated!). Now is base on the -1, 0, 1 values. The trick is to backup the hardduedatecompare value for each line of the table. --- .../prog/en/modules/admin/smart-rules.tt | 39 ++++++++++++-------- 1 file changed, 23 insertions(+), 16 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 b236e9a..7a9490a 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 @@ -59,16 +59,14 @@ $(document).ready(function() { } } else { // specific processing for the Hard due date column - var s = itm.split(' '); - var select_value; - if ( s[0] == "before" ) { - select_value = -1 - } else if ( s[0] == "on" ) { - select_value = 0 - } else if ( s[0] == "after" ) { - select_value = 1 + var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val(); + var input_value = ''; + if (typeof select_value === 'undefined'){ + select_value = '-1'; + }else { + input_value = itm.split(' ')[1]; } - $(current_column).find("input[type='text']").val(s[1]); + $(current_column).find("input[type='text']").val(input_value); $(current_column).find("select").val(select_value); } }); @@ -178,13 +176,22 @@ for="tobranch">Clone these rules to: + [% ELSIF ( rule.hardduedateexact ) %] + on [% rule.hardduedate %] + + [% ELSIF ( rule.hardduedateafter ) %] + after [% rule.hardduedate %] + + [% END %] + [% ELSE %] + None defined + [% END %] + [% rule.fine %] [% rule.chargeperiod %] [% rule.firstremind %] -- 1.7.10.4