Bugzilla – Attachment 60201 Details for
Bug 18076
Error when placing a hold and holds per record is set to 999
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18076: Replace holds_to_place_count with an input type=text
Bug-18076-Replace-holdstoplacecount-with-an-input-.patch (text/plain), 2.67 KB, created by
Nick Clemens (kidclamp)
on 2017-02-14 13:04:41 UTC
(
hide
)
Description:
Bug 18076: Replace holds_to_place_count with an input type=text
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-02-14 13:04:41 UTC
Size:
2.67 KB
patch
obsolete
>From 0a3e310a24f1514c6d33facfe80df57abb5a2aa3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 8 Feb 2017 12:41:37 +0100 >Subject: [PATCH] Bug 18076: Replace holds_to_place_count with an input > type=text > >From http://www.template-toolkit.org/docs/manual/Directives.html#section_WHILE > >""" >The Template Toolkit uses a failsafe counter to prevent runaway WHILE loops which > would otherwise never terminate. If the loop exceeds 1000 iterations then an undef >exception will be thrown, reporting the error: > >WHILE loop terminated (> 1000 iterations) > >The $Template::Directive::WHILE_MAX variable controls this behaviour and can be set >to a higher value if necessary. >""" > >I do not think we want to increase this value, and I do not think we want to display a >dropdown list with 1000 entries. > >This patch replaces the dropdown list with an input text. > >Test plan: >- Set circulation conditions - holds per record = 999 >- Search for record with items >- Go to the holds tab >- Search for a patron >- Verify that when you send your search, the 'internal server error' is not shown >and you see the input text. >You should be able to enter a value > than 999 and < 1 > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 12b4e1b..895d06f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -421,19 +421,12 @@ function checkMultiHold() { > </li> > > [% IF remaining_holds_for_record > 1 %] >- [% SET count = 1 %] > <li> > <label for="holds_to_place_count">Holds to place (count)</label> >- <select name="holds_to_place_count" id="holds_to_place_count"> >- [% WHILE count <= remaining_holds_for_record %] >- <option value="[% count %]">[% count %]</option> >- [% SET count = count + 1 %] >- [% END %] >- >- </select> >+ <input type="number" name="holds_to_place_count" min="1" max="[% remaining_holds_for_record %]" step="1" value="1" /> > </li> > [% ELSE %] >- <input type="hidden" name="holds_to_place_count" value="1"> >+ <input type="hidden" name="holds_to_place_count" value="1" /> > [% END %] > [% END %] > >-- >2.1.4
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 18076
:
60021
|
60041
| 60201