Bugzilla – Attachment 120235 Details for
Bug 28169
Reverting waiting hold causes holds page Javascript stop functioning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28169: Add quotes around value in template to render proper JS
Bug-28169-Add-quotes-around-value-in-template-to-r.patch (text/plain), 2.31 KB, created by
Martin Renvoize (ashimema)
on 2021-04-27 13:59:37 UTC
(
hide
)
Description:
Bug 28169: Add quotes around value in template to render proper JS
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-04-27 13:59:37 UTC
Size:
2.31 KB
patch
obsolete
>From cede050c24119022dd90439213770cada1a18ff3 Mon Sep 17 00:00:00 2001 >From: Andrew Nugged <nugged@gmail.com> >Date: Mon, 19 Apr 2021 15:02:09 +0300 >Subject: [PATCH] Bug 28169: Add quotes around value in template to render > proper JS > >There is code in request.tt: > > homebranch: "[% ... %]", > holdallowed: [% ... %] > >There only digits where expected earlier in holdallowed >but now it can be string value ('from_any_library' for example), >so it should be in quotes. > >To reproduce the problem: >1. Add circulation rules which allow 1 hold only to the itemtype >2. Make sure AllowHoldPolicyOverride syspref enabled >3. Make 1 hold to patron for any biblio which has a few items available, > for example on "reset_all dev db set": > /cgi-bin/koha/reserve/request.pl?biblionumber=4&findborrower=1 > (this biblio record has 4 items) >4. Start another hold for same patron on any biblio record or the same, > and keep browser's JS console open, > for example on "reset_all dev db set": > /cgi-bin/koha/reserve/request.pl?biblionumber=4&findborrower=1 >5. You should see now JS error in browser console: > Uncaught ReferenceError: from_any_library is not defined > Uncaught ReferenceError: columns_settings_borrowers_table is not defined >6. Apply the patch >7. Repeat the steps 4-5 (reload the page) and now the JS error should be gone > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >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 b3bf8df72e..0c7968617a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1029,7 +1029,7 @@ > var override_items = {[% FOREACH bibitemloo IN bibitemloop %][% FOREACH itemloo IN bibitemloo.itemloop %][% IF ( itemloo.override ) %] > [% itemloo.itemnumber | html %]: { > homebranch: "[% To.json( Branches.GetName( itemloo.homebranch ) ) | $raw %]", >- holdallowed: [% itemloo.holdallowed | html %] >+ holdallowed: "[% itemloo.holdallowed | html %]" > }, > [% END %][% END %][% END %] > }; >-- >2.20.1
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 28169
:
119853
|
119917
| 120235