Koha/koha-tmpl/intranet-tmpl/prog
Martin Renvoize 6898f1f132
Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete
This patch updates js_includes.inc to set a new global js variable
`defaultPatronSearchFields` with the content of the corresponding system
preference.

We then update the patron_autocomplete function to use this new global
variable and iterate in the same way as
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc.

NOTE: This changes the behaviour of the autocomplete from always
searching using contains on surname or firstname or starts with on
cardnumber to searching using 'contains' on any of the fields listed in
the DefaultPatronSearchFields system preference of defaulting to
'firstname,middle_name,surname,othernames,cardnumber,userid'.

Test plan
1. Ensure autocomplete still works everywhere
2. Confirm the system preference fields are being used.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2023-01-27 16:20:54 -03:00
..
css Bug 32319: Compiled CSS 2023-01-06 14:24:26 -03:00
en Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete 2023-01-27 16:20:54 -03:00
img Bug 30952: Change circulation home page links to buttons 2022-10-12 16:14:03 -03:00
js Bug 32520: Use DefaultPatronSearchFields in patron_autocomplete 2023-01-27 16:20:54 -03:00
pdf Bug 31257: Add a new English 1 page layout to export basketgroup 2022-10-11 10:44:10 -03:00
sound