Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a...
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 7 Mar 2024 07:50:54 +0000 (08:50 +0100)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Tue, 12 Mar 2024 16:47:36 +0000 (17:47 +0100)
commit81bc300957b6d48f678a1d5dde5820070a8c3f07
tree631c316db3915223216638925649e3e4356e865f
parent1201a739676d37f805e886a6ac70c16b37eede14
Bug 36251: (bug 35329 follow-up) Fix patron search by first letter when placing a hold

Most of the patrons searches open in a modal. Except:
* the main one (members-home)
* when placing a hold
* when requesting an article
(did I miss one?)

The patron-search.inc BLOCKs need a parent block to know where to locate
the elements (form, table, etc), because we can have several patron
searches on the same page.

Bug 35329 reused '#searchresults':
  10 [% SET search_results_block_id = 'searchresults' %]
which is used on the main patron search.
The ones in the modal are correctly handled: we build the parent node in
the "patron_search_modal" block.
But for the 2 others the parent block id is wrong.

On reserve/request.tt we have one already, so we set the TT variable from the
.tt file
On circ/request-article we don't have one already, so we can reuse
searchresults (could be more specific however to include 'patrons'...)

Test plan:
Browse patrons by first letter when placing a hold and requesting an
article

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt