From 87e7062c51dd7bef606f7f2dff3d2abf4c93dfb3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 28 Oct 2021 15:03:18 -0300 Subject: [PATCH] Bug 29355: Make pickup location dropdowns RESTdefaultPageSize agnostic This patch makes the select2 dropdowns for pickup locations not be limited to the RESTdefaultPageSize syspref limit. To test: 1. Have less than 20 libraries in your system as valid pickup locations 2. Place a hold via the staff client => SUCCESS: See that all your libraries appear in the pickup location dropdowns at the bib and item level 3. Update RESTdefaultPageSize, set the value to something lower than your count of pickup libraries 4. place another hold => FAIL: Your pickup location list gets cut off and only shows as many locations as RESTdefaultPageSize allows 5. Apply this patch 6. Repeat 4 => SUCCESS: All your pickup locations show 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../intranet-tmpl/prog/en/modules/reserve/request.tt | 9 ++++++--- koha-tmpl/intranet-tmpl/prog/js/holds.js | 3 ++- 2 files changed, 8 insertions(+), 4 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 a6d269f71f..7e3d05402b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1261,7 +1261,8 @@ var search_term = (params.term === undefined) ? '' : params.term; var query = { "q": JSON.stringify({"name":{"-like":search_term+'%'}}), - "_order_by": "name" + "_order_by": "name", + "_per_page": -1 }; return query; }, @@ -1323,7 +1324,8 @@ var query = { "q": JSON.stringify({"name":{"-like":search_term+'%'}}), "_order_by": "name", - "patron_id": patron_id + "patron_id": patron_id, + "_per_page": -1 }; return query; }, @@ -1360,7 +1362,8 @@ var query = { "q": JSON.stringify({"name":{"-like":search_term+'%'}}), "_order_by": "name", - "patron_id": patron_id + "patron_id": patron_id, + "_per_page": -1 }; return query; }, diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js index 13309533a9..1f32a00f9f 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/holds.js +++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js @@ -250,7 +250,8 @@ $(document).ready(function() { var search_term = (params.term === undefined) ? '' : params.term; var query = { "q": JSON.stringify({"name":{"-like":search_term+'%'}}), - "_order_by": "name" + "_order_by": "name", + "_per_page": -1 }; return query; }, -- 2.20.1