From 8223c5765dc70bfdb845bfba70f9e57085b1a199 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 8 Oct 2024 11:35:08 +0200 Subject: [PATCH] Bug 33484: Do not defer loading if state is loaded from localStorage Squashing Revert "Bug 33484: (Bug 27467) Fix patrons search" This reverts commit 0d21ff768b97bc8393a01b0ad881961a3252f2cf. Signed-off-by: Pedro Amorim Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 4 +++- members/members-home.pl | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc index e8586ac45b1..7af7ba0ac19 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -766,7 +766,9 @@ parent_block.find(".searchpattern").parent().hide(); }); - if ( !defer_loading ) { + let table_dt = patrons_table.DataTable(); + let loaded_from_state = table_dt.settings()[0].loaded_from_state; + if ( !defer_loading || loaded_from_state ) { patron_search_form.submit(); } diff --git a/members/members-home.pl b/members/members-home.pl index 1cc28f93678..7989620f331 100755 --- a/members/members-home.pl +++ b/members/members-home.pl @@ -73,7 +73,7 @@ $template->param( PatronAutoComplete => C4::Context->preference('PatronAutoComplete'), patron_lists => [ GetPatronLists() ], PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, - defer_loading => ( scalar $query->param('memberresultst_state') ) ? 0 : 1, + defer_loading => 1, ); output_html_with_http_headers $query, $cookie, $template->output; -- 2.34.1