From: Jonathan Druart Date: Thu, 21 Mar 2013 11:32:43 +0000 (+0100) Subject: Bug 4354: Followup: FIX the hardduedate copy X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=b8c8856840ebcef2639274be2424e783e476fa67;p=koha.git 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. Signed-off-by: Cedric Vita Signed-off-by: Katrin Fischer Signed-off-by: Jared Camins-Esakov --- 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 b236e9af19..7a9490ad89 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 %]