Bugzilla – Attachment 113537 Details for
Bug 26988
Defer loading the hold pickup locations until the dropdown is selected
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26988: (follow-up) Fix filter and encode api values and escape rendered values
Bug-26988-follow-up-Fix-filter-and-encode-api-valu.patch (text/plain), 2.84 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-11-11 19:16:32 UTC
(
hide
)
Description:
Bug 26988: (follow-up) Fix filter and encode api values and escape rendered values
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-11-11 19:16:32 UTC
Size:
2.84 KB
patch
obsolete
>From 5fd83220126df8e90c97e835737e8f10f31aba4c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 11 Nov 2020 03:11:56 +0000 >Subject: [PATCH] Bug 26988: (follow-up) Fix filter and encode api values and > escape rendered values > >This patch makes the QA tools happy and follows correct procedures for passing data to >and rendering data from the api > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index 74829814294..59f33cd2a0a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -136,7 +136,7 @@ > <option selected="selected" value="[% hold.branchcode | html %]">[% Branches.GetName(hold.branchcode) | html %]</option> > <option value="" disabled="disabled" class="loading">Loading...</option> > </select> >- <img class="loading_[% hold.reserve_id %]" src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" style="display:none;"/> >+ <img class="loading_[% hold.reserve_id | html %]" src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" style="display:none;"/> > [% END %] > [% END %] > </td> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index f6a941979de..cdf5b9912a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -308,7 +308,7 @@ $(document).ready(function() { > var hold_id = $(this).data('hold_id'); > $(".loading_"+hold_id).show(); > var preselected = $(this).data('selected'); >- var api_url = '/api/v1/holds/'+hold_id+'/pickup_locations'; >+ var api_url = '/api/v1/holds/' + encodeURIComponent(hold_id) + '/pickup_locations'; > $.ajax({ > method: "GET", > url: api_url, >@@ -318,7 +318,7 @@ $(document).ready(function() { > if( preselected == library.library_id ){ > selected = ' selected="selected" '; > } else { selected = ""; } >- dropdown += '<option value="'+library.library_id+'"'+selected+'>'+library.name+'</option>'; >+ dropdown += '<option value="' + library.library_id.escapeHtml() + '"' + selected + '>' + library.name.escapeHtml() + '</option>'; > }); > this_dropdown.html(dropdown); > this_dropdown.data("loaded",1); >-- >2.29.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 26988
:
113395
|
113418
|
113426
|
113427
|
113428
|
113456
|
113457
|
113458
|
113459
|
113460
|
113502
|
113533
|
113534
|
113535
|
113536
| 113537 |
113538
|
113590
|
113601
|
113669