Bug 33484: Fix patron search form
Reset DT's filters if we are searching again using the search form. If you use the form on the left we need to reset the different filters that could have been set from a previous state we loaded. Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> 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
d8731cec9b
commit
cf6ba3ebcb
|
|
@ -871,6 +871,7 @@
|
|||
let table_dt = patrons_table.DataTable();
|
||||
let loaded_from_state = table_dt.settings()[0].loaded_from_state;
|
||||
if ( !loaded_from_state ) {
|
||||
table_dt.search("").columns().search("");
|
||||
[% FOR c IN columns %]
|
||||
[% SWITCH c %]
|
||||
[% CASE 'branch' %]
|
||||
|
|
@ -883,8 +884,8 @@
|
|||
table_dt.column([% loop.count - 1 %]).search(category_id ? '^'+category_id+'$' : '');
|
||||
[% END %]
|
||||
[% END %]
|
||||
table_dt.search("");
|
||||
}
|
||||
table_dt.settings()[0].loaded_from_state = false;
|
||||
first_draw = 1; // Only redirect if we are coming from here
|
||||
table_dt.draw();
|
||||
[% IF display_search_description %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue