Bug 33484: Pass external filters only if exists
The external_filter_nodes object should only be passed if the filters block on the left actually exists. So only for the main patron search, not the other ones. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
9f623e2962
commit
b4099974f0
|
|
@ -31,6 +31,7 @@
|
|||
[%# - search_type: select 'contains' or 'starts with' %]
|
||||
[%- searchtype = searchtype || Koha.Preference('DefaultPatronSearchMethod') -%]
|
||||
[% BLOCK patron_search_filters %]
|
||||
[% SET has_patron_search_filters_block = 1 %]
|
||||
<aside>
|
||||
<form method="get" class="patron_search_form">
|
||||
<fieldset class="brief">
|
||||
|
|
@ -406,14 +407,17 @@
|
|||
return filters;
|
||||
}
|
||||
};
|
||||
let external_filter_nodes = {
|
||||
search_patron_filter: '.search_patron_filter',
|
||||
firstletter_filter: '.firstletter_filter',
|
||||
searchtype_filter: '.searchtype_filter',
|
||||
searchfieldstype_filter: '.searchfieldstype_filter',
|
||||
categorycode_filter: '.categorycode_filter',
|
||||
branchcode_filter: '.branchcode_filter'
|
||||
};
|
||||
let external_filter_nodes = {};
|
||||
[% IF has_patron_search_filters_block %]
|
||||
external_filter_nodes = {
|
||||
search_patron_filter: '.search_patron_filter',
|
||||
firstletter_filter: '.firstletter_filter',
|
||||
searchtype_filter: '.searchtype_filter',
|
||||
searchfieldstype_filter: '.searchfieldstype_filter',
|
||||
categorycode_filter: '.categorycode_filter',
|
||||
branchcode_filter: '.branchcode_filter'
|
||||
};
|
||||
[% END %]
|
||||
|
||||
[% UNLESS default_sort_column %]
|
||||
[% default_sort_column = "name" %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue