Bugzilla – Attachment 153318 Details for
Bug 33028
Wrongly formatted monetary amounts in circulation rules break scripts and calculations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33028: Add TT filters for Price and pattern checks to input fields
Bug-33028-Add-TT-filters-for-Price-and-pattern-che.patch (text/plain), 5.26 KB, created by
Katrin Fischer
on 2023-07-11 13:27:38 UTC
(
hide
)
Description:
Bug 33028: Add TT filters for Price and pattern checks to input fields
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-07-11 13:27:38 UTC
Size:
5.26 KB
patch
obsolete
>From 07354489b397d26a6f112d02e7de378c73ac0dd6 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Fri, 16 Jun 2023 16:59:22 +0000 >Subject: [PATCH] Bug 33028: Add TT filters for Price and pattern checks to > input fields > >With this patch, all monetary values in the table will be displayed >formatted. > >Also, the input will be checked against our agreed pattern to make >sure no false values can be entered. > >Missing: When editing a rule, we need to unformat the value, so that >instead of the display format we have the input format available >for editing. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > .../prog/en/modules/admin/smart-rules.tt | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 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 7d403b1214..ef9c459245 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 >@@ -287,7 +287,7 @@ > [% END %] > </td> > <td>[% decreaseloanholds | html %]</td> >- <td>[% fine | html %]</td> >+ <td>[% fine | $Price %]</td> > <td>[% chargeperiod | html %]</td> > <td>[% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td> > <td>[% firstremind | html %]</td> >@@ -462,7 +462,7 @@ > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </td> > <td><input type="text" name="decreaseloanholds" id="decreaseloanholds" size="2" /></td> >- <td><input type="text" name="fine" id="fine" size="4" /></td> >+ <td><input type="text" name="fine" id="fine" size="4" inputmode="decimal" pattern="^\d+(\.\d{2})?$" /></td> > <td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td> > <td> > <select name="chargeperiod_charge_at" id="chargeperiod_charge_at"> >@@ -471,7 +471,7 @@ > </select> > </td> > <td><input type="text" name="firstremind" id="firstremind" size="2" /> </td> >- <td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td> >+ <td><input type="text" name="overduefinescap" id="overduefinescap" size="6" inputmode="decimal" pattern="^\d+(\.\d{2})?$" /> </td> > <td><input type="checkbox" name="cap_fine_to_replacement_price" id="cap_fine_to_replacement_price" /></td> > <td><input type="text" name="finedays" id="fined" size="3" /> </td> > <td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td> >@@ -531,7 +531,7 @@ > </select> > </td> > <td><input type="text" name="recall_due_date_interval" id="recall_due_date_interval" size="3"></td> >- <td><input type="text" name="recall_overdue_fine" id="recall_overdue_fine" size="6"></td> >+ <td><input type="text" name="recall_overdue_fine" id="recall_overdue_fine" size="6" inputmode="decimal" pattern="^\d+(\.\d{2})?$"></td> > <td><input type="text" name="recall_shelf_time" id="recall_shelf_time" size="3"></td> > [% END %] > <td class="actions"> >@@ -1030,7 +1030,7 @@ > </td> > <td> > [% IF article_request_fee.defined && article_request_fee != '' %] >- [% article_request_fee | html %] >+ [% article_request_fee | $Price %] > [% ELSE %] > <span>0</span> > [% END %] >@@ -1050,7 +1050,7 @@ > [% END %] > </select> > </td> >- <td><input name="article_request_fee" size="3" type="text" /></td> >+ <td><input name="article_request_fee" size="5" type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" /></td> > <td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</button></td> > </tr> > </table> >-- >2.30.2
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 33028
:
147058
|
147686
|
147687
|
147688
|
152441
|
152442
|
152443
|
152444
|
152445
|
152446
|
152509
|
152510
|
152511
|
152512
|
152513
|
152514
|
152515
|
152752
|
152753
|
152754
|
152755
|
152756
|
152757
|
152758
|
152759
|
152760
|
152761
|
152762
|
152763
|
152764
|
152803
|
152804
|
152805
|
152829
|
152928
|
152929
|
152930
|
152931
|
152932
|
152933
|
152934
|
152935
|
152936
|
153313
|
153314
|
153315
|
153316
|
153317
| 153318 |
153319
|
153320
|
153321
|
153322
|
153323
|
153619
|
153620
|
153632
|
153633
|
153634
|
153635
|
153636
|
153677