Bugzilla – Attachment 16616 Details for
Bug 4354
Cannot edit existing issuing rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4354: Followup: FIX the hardduedate copy
Bug-4354-Followup-FIX-the-hardduedate-copy.patch (text/plain), 4.09 KB, created by
Paul Poulain
on 2013-03-21 12:53:57 UTC
(
hide
)
Description:
Bug 4354: Followup: FIX the hardduedate copy
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2013-03-21 12:53:57 UTC
Size:
4.09 KB
patch
obsolete
>From ffd6892a7340e01f2be6c643a7f72d0ea75ebb64 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >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. > >Signed-off-by: Cedric Vita <cedric.vita@dracenie.com> >--- > .../prog/en/modules/admin/smart-rules.tt | 39 ++++++++++++-------- > 1 files 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"><strong>Clone these rules to:</strong></label> <input type="hidde > <td> > [% rule.lengthunit %] > </td> >- <td>[% IF ( rule.hardduedate ) %] >- [% IF ( rule.hardduedatebefore ) %]before [% rule.hardduedate %]</td> >- [% ELSE %][% IF ( rule.hardduedateexact ) %]on [% rule.hardduedate %]</td> >- [% ELSE %][% IF ( rule.hardduedateafter ) %]after [% rule.hardduedate %]</td>[% END %] >- [% END %] >- [% END %] >- [% ELSE %]None defined[% END %] >+ <td> >+ [% IF ( rule.hardduedate ) %] >+ [% IF ( rule.hardduedatebefore ) %] >+ before [% rule.hardduedate %] >+ <input type="hidden" name="hardduedatecomparebackup" value="-1" /> >+ [% ELSIF ( rule.hardduedateexact ) %] >+ on [% rule.hardduedate %] >+ <input type="hidden" name="hardduedatecomparebackup" value="0" /> >+ [% ELSIF ( rule.hardduedateafter ) %] >+ after [% rule.hardduedate %] >+ <input type="hidden" name="hardduedatecomparebackup" value="1" /> >+ [% END %] >+ [% ELSE %] >+ None defined >+ [% END %] >+ </td> > <td>[% rule.fine %]</td> > <td>[% rule.chargeperiod %]</td> > <td>[% rule.firstremind %]</td> >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 4354
:
2182
|
2932
|
2946
|
14622
|
14818
|
14819
|
14821
|
14824
|
14829
|
16199
|
16200
|
16234
|
16610
|
16611
|
16615
|
16616
|
16617
|
16618
|
16650
|
16654
|
16655
|
16656
|
16657
|
16658