Bugzilla – Attachment 190308 Details for
Bug 41405
Patron categories noissuescharge values default to 0 when not set
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41405: Treat blank value as unset
Bug-41405-Treat-blank-value-as-unset.patch (text/plain), 6.80 KB, created by
Nick Clemens (kidclamp)
on 2025-12-08 18:57:51 UTC
(
hide
)
Description:
Bug 41405: Treat blank value as unset
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-12-08 18:57:51 UTC
Size:
6.80 KB
patch
obsolete
>From 371aac37532113dd6ae3939efc0b5cd522f8a485 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 8 Dec 2025 18:57:30 +0000 >Subject: [PATCH] Bug 41405: Treat blank value as unset > >--- > .../prog/en/modules/admin/categories.tt | 46 ++++++++++++------- > 1 file changed, 29 insertions(+), 17 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >index e91ba21feb3..dbe1558941a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt >@@ -484,27 +484,39 @@ > </li> > <li> > <label for="noissuescharge">Checkout charge limit: </label> >- <input type="text" pattern="^\d+(\.\d{2})?$" name="noissuescharge" id="noissuescharge" value="[% category.noissuescharge | $Price on_editing => 1 %]" size="5" maxlength="8" /> >+ [% IF category.noissuescharge != '' %] >+ <input type="text" pattern="^\d+(\.\d{2})?$" name="noissuescharge" id="noissuescharge" value="[% category.noissuescharge | $Price on_editing => 1 %]" size="5" maxlength="8" /> >+ [% ELSE %] >+ <input type="text" pattern="^\d+(\.\d{2})?$" name="noissuescharge" id="noissuescharge" value="" size="5" maxlength="8" /> >+ [% END %] > [%- SET pref_noissuescharge_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=noissuescharge&ok=Search">noissuescharge</a>' -%] > <div class="hint">If set, this will override the global value set in the [%- pref_noissuescharge_link | $raw | $KohaSpan -%] system preference.</div> > </li> > <li> > <label for="noissueschargeguarantees">Guarantees checkout charge limit: </label> >- <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantees" id="noissueschargeguarantees" value="[% category.noissueschargeguarantees | $Price on_editing => 1 %]" size="5" maxlength="8" /> >+ [% IF category.noissueschargeguarantees != '' %] >+ <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantees" id="noissueschargeguarantees" value="[% category.noissueschargeguarantees | $Price on_editing => 1 %]" size="5" maxlength="8" /> >+ [% ELSE %] >+ <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantees" id="noissueschargeguarantees" value="" size="5" maxlength="8" /> >+ [% END %] > [%- SET pref_NoIssuesChargeGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantees&ok=Search">NoIssuesChargeGuarantees</a>' -%] > <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantees_link | $raw | $KohaSpan -%] system preference.</div> > </li> > <li> > <label for="noissueschargeguarantorswithguarantees">Guarantors with guarantees checkout charge limit: </label> >- <input >- type="text" >- pattern="^\d+(\.\d{2})?$" >- name="noissueschargeguarantorswithguarantees" >- id="noissueschargeguarantorswithguarantees" >- value="[% category.noissueschargeguarantorswithguarantees | $Price on_editing => 1 %]" >- size="5" >- maxlength="8" >- /> >+ [% IF category.noissueschargeguarantees != '' %] >+ <input >+ type="text" >+ pattern="^\d+(\.\d{2})?$" >+ name="noissueschargeguarantorswithguarantees" >+ id="noissueschargeguarantorswithguarantees" >+ value="[% category.noissueschargeguarantorswithguarantees | $Price on_editing => 1 %]" >+ size="5" >+ maxlength="8" >+ /> >+ [% ELSE %] >+ <input type="text" pattern="^\d+(\.\d{2})?$" name="noissueschargeguarantorswithguarantees" id="noissueschargeguarantorswithguarantees" value="" size="5" maxlength="8" /> >+ [% END %] > [%- SET pref_NoIssuesChargeGuarantorsWithGuarantees_link = '<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=NoIssuesChargeGuarantorsWithGuarantees&ok=Search">NoIssuesChargeGuarantorsWithGuarantees</a>' -%] > <div class="hint">If set, this will override the global value set in the [%- pref_NoIssuesChargeGuarantorsWithGuarantees_link | $raw | $KohaSpan -%] system preference.</div> > </li> >@@ -830,20 +842,20 @@ > <span>No</span> > [% END %] > </td> >- [% IF (category.noissuescharge) %] >+ [% IF (category.noissuescharge != '') %] > <td>[% category.noissuescharge | $Price %]</td> > [% ELSE %] >- <td>[% 0.00 | $Price %]</td> >+ <td>Unset</td> > [% END %] >- [% IF (category.noissueschargeguarantees) %] >+ [% IF (category.noissueschargeguarantees != '') %] > <td>[% category.noissueschargeguarantees | $Price %]</td> > [% ELSE %] >- <td>[% 0.00 | $Price %]</td> >+ <td>Unset</td> > [% END %] >- [% IF (category.noissueschargeguarantorswithguarantees) %] >+ [% IF (category.noissueschargeguarantorswithguarantees != '') %] > <td>[% category.noissueschargeguarantorswithguarantees | $Price %]</td> > [% ELSE %] >- <td>[% 0.00 | $Price %]</td> >+ <td>Unset</td> > [% END %] > <td>[% IF category.enforce_expiry_notice %]Yes[% ELSE %]No[% END %]</td> > <td class="actions"> >-- >2.39.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 41405
: 190308