Bug 40121: Fix library and category filters on patron search

Test plan:
Go to http://localhost:8081/cgi-bin/koha/members/members-home.pl
Select a value for Library and/or Category filters
Click "Search"
=> Without this patch the dropdown lists do not have the value selected
=> With this patch applied they have the correct values selected

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0f4f792c6c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
Jonathan Druart 2025-06-11 16:41:50 +02:00 committed by Paul Derscheid
parent 4caa113d62
commit 90aef7ae36
No known key found for this signature in database
GPG Key ID: C25F9FD44CED595B
1 changed files with 2 additions and 2 deletions

View File

@ -900,11 +900,11 @@
[% SWITCH c %]
[% CASE 'branch' %]
let library_id = patron_search_form.find(".branchcode_filter").val() || "";
patrons_table.find('thead tr:eq(1) th[data-filter="libraries"] select').val(library_id);
patrons_table.find('thead tr:eq(1) th[data-filter="libraries"] select').val('^' + library_id + '$');
table_dt.column([% loop.count - 1 %]).search(library_id ? '^'+library_id+'$' : '');
[% CASE 'category' %]
let category_id = patron_search_form.find(".categorycode_filter").val() || "";
patrons_table.find('thead tr:eq(1) th[data-filter="categories"] select').val(category_id.toLowerCase());
patrons_table.find('thead tr:eq(1) th[data-filter="categories"] select').val('^' + category_id.toLowerCase() + '$');
table_dt.column([% loop.count - 1 %]).search(category_id ? '^'+category_id+'$' : '');
[% END %]
[% END %]