Bug 30485: (bug 30063 follow-up) Display all patrons if not term passed

Regression from bug 30063. If you are searching all patrons (not search term passed) from the header, the patron search result is not displayed.

Test plan:
Go to the Koha homepage, search patrons, don't enter a search term and
click "submit"
All patrons must be returned.
Regression test: on the other patron search forms, confirm that there is
no regression, ie. no patron displayed until you search for something

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2022-04-07 14:25:08 +02:00 committed by Fridolin Somers
parent c76fe72647
commit 0aeb470814
3 changed files with 5 additions and 6 deletions
koha-tmpl/intranet-tmpl/prog/en/includes
members

View file

@ -249,10 +249,10 @@
var Sticky;
var singleBranchMode = '[% singleBranchMode | html %]';
let logged_in_library_id = "[% Branches.GetLoggedInBranchcode | html %]";
[% IF defer_loading %]
let defer_loading = 1;
[% ELSE %]
[% IF do_not_defer_loading %]
let defer_loading = 0;
[% ELSE %]
let defer_loading = 1;
[% END %]
/* popstate event triggered by forward and back button. Need to refresh search */
@ -670,7 +670,7 @@
$("#searchpattern").parent().hide();
});
if ( !defer_loading && $("#search_patron_filter").val().length > 0 ) {
if ( !defer_loading ) {
$("#patron_search_form").submit();
}

View file

@ -78,7 +78,7 @@ $template->param(
searchtype => scalar $input->param('searchtype') || 'contain',
searchfieldstype => $searchfieldstype,
PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
defer_loading => $defer_loading,
do_not_defer_loading => !$defer_loading,
circsearch => $circsearch,
attribute_type_codes => ( C4::Context->preference('ExtendedPatronAttributes')
? [ Koha::Patron::Attribute::Types->search( { staff_searchable => 1 } )->get_column('code') ]

View file

@ -76,7 +76,6 @@ $template->param(
attribute_type_codes => ( C4::Context->preference('ExtendedPatronAttributes')
? [ Koha::Patron::Attribute::Types->search( { staff_searchable => 1 } )->get_column('code') ]
: [] ),
defer_loading => 1,
);
output_html_with_http_headers $query, $cookie, $template->output;