Bugzilla – Attachment 168773 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.13 KB, created by
David Nind
on 2024-07-11 04:14:17 UTC
(
hide
)
Description:
Bug 36981: Check for subscription length value
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-07-11 04:14:17 UTC
Size:
4.13 KB
patch
obsolete
>From 22c8dbeb49f3f37b55cd90847c57b8932a22e422 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) > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../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 2c6705656e..03832abb50 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 a358f68f7e..d6a055ba78 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 c510590163..9a7e7df246 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.39.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 36981
:
168308
| 168773