Bugzilla – Attachment 168308 Details for
Bug 36981
Check for subscription length value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36981: Check for subscription length value
Bug-36981-Check-for-subscription-length-value.patch (text/plain), 4.07 KB, created by
Baptiste Wojtkowski (bwoj)
on 2024-07-01 09:41:08 UTC
(
hide
)
Description:
Bug 36981: Check for subscription length value
Filename:
MIME Type:
Creator:
Baptiste Wojtkowski (bwoj)
Created:
2024-07-01 09:41:08 UTC
Size:
4.07 KB
patch
obsolete
>From 08c7e5a21e55b030d17f3ddb6ec51a473880f2d4 Mon Sep 17 00:00:00 2001 >From: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com> >Date: Mon, 1 Jul 2024 11:27:49 +0200 >Subject: [PATCH] Bug 36981: Check for subscription length value > >Original comment: When editing serial subscription, it is possible to set amount such as 999999999 in "Subscription length" field. >If no end date is set this could cause an infinite loop. > >I changed all concerned fields toward number fields with minimum 0 and >max 2000 (arbitrary but I think it is nearly impossible to reach such an > high number) > >TEST PLAN: >1 - Apply patch >2 - go to Serials -> search -> pick a subsciption >3 - Click on Edit->Edit subscription >4 - fill correct infos and go to page 2 >5 - notice that the second field after the label subscription length is > a number field >6 - try and fill -1 in this field -> notice it is impossible to save >7 - try and fill 5000 in this field -> notice it is impossible to save >8 - Repeat the process py clicking on "Renew" at step (3) >9 - Repeat the process py clicking on "numbering patterns" at step (3) > (note, you can test the pattern but when clicking done you will be > prevented from) >--- > .../intranet-tmpl/prog/en/modules/serials/subscription-add.tt | 2 +- > .../prog/en/modules/serials/subscription-numberpatterns.tt | 2 +- > .../intranet-tmpl/prog/en/modules/serials/subscription-renew.tt | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >index 2c67056..03832ab 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt >@@ -346,7 +346,7 @@ fieldset.rows table { clear: none; margin: 0; } > </option> > [% END %] > </select> >- <input type="text" name="sublength" id="sublength" value="[% sublength | html %]" size="3" /> (enter amount in numerals) >+ <input name="sublength" id="sublength" value="[% sublength | html %]" size="6" type=number min=0 max=2000 /> > <input type="hidden" name="issuelengthcount"> > </li> > <li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >index a358f68..d6a055b 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-numberpatterns.tt >@@ -203,7 +203,7 @@ > <option value="weeks">weeks</option> > <option value="months">months</option> > </select> >- <input type="text" id="sublength" size="3" /> >+ <input type="number" id="sublength" size="6" min=0 max=2000 /> > </li> > <li> > <label for="locale">Locale: </label> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >index c510590..9a7e7df 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-renew.tt >@@ -80,7 +80,7 @@ > </option> > [% END %] > </select> >- <input type="text" name="sublength" id="sublength" size="3" value="[% subscription.numberlength || subscription.weeklength || subscription.monthlength | html %]" />(enter amount in numerals) >+ <input type="number" name="sublength" id="sublength" size="6" value="[% subscription.numberlength || subscription.weeklength || subscription.monthlength | html %]" min=0 max=2000 /> > <input type="hidden" name="issuelengthcount"> > </li> > >-- >2.43.0
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 36981
:
168308
|
168773