From e88307e0f17dfda0c36cd5a619b44f61a21628e5 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Wed, 15 Oct 2025 09:06:29 +0000 Subject: [PATCH] Bug 40504: Preparation: Add empty_table_settings option to patron_search_js This is required for ILL 'select manager' functionality, as table_settings are already defined there and the user modal table will pick that up unless explicitly stated to not use it, thus empty_table_settings --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 5 ++++- koha-tmpl/intranet-tmpl/prog/en/includes/select_manager.inc | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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 a4f76e8e116..8521528b9df 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -236,6 +236,7 @@ [%# display_search_description: boolean, default off. Display the description of the search %] [%# adjust_history: boolean, default off. Change the current url when a first letter is selected %] [%# defer_loading: boolean, default on. If true, it will not load the table until a search is triggered %] +[%# empty_table_settings: boolean, default off. If true, it will ensure no table_settings are utilized %] [% BLOCK patron_search_js %] [% IF redirect_if_one_result && !redirect_url %] @@ -285,6 +286,8 @@ return map; }, {}); + var empty_table_settings = '[% empty_table_settings | html %]' + [% IF Koha.Preference('ExtendedPatronAttributes') %] [% SET extended_attribute_types = ExtendedAttributeTypes.codes( staff_searchable => 1, searched_by_default => 1 ) %] [% IF ( extended_attribute_types ) %][% extended_attribute_types = [ extended_attribute_types ] %][% END %] @@ -783,7 +786,7 @@ }, [% END %] fixedHeader: false, - }, typeof table_settings !== 'undefined' ? table_settings : null, 1, additional_filters, undefined, external_filter_nodes, parent_block.find(".search_description"), additional_search_descriptions ); + }, typeof table_settings !== 'undefined' && !empty_table_settings ? table_settings : null, 1, additional_filters, undefined, external_filter_nodes, parent_block.find(".search_description"), additional_search_descriptions ); patron_search_form.on('submit', filter); patron_search_form.on('submit', update_search_type); diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/select_manager.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/select_manager.inc index 6a40a310a9b..a2fe25ea513 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/select_manager.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/select_manager.inc @@ -14,6 +14,7 @@ preview_on_name_click => 1, table_id => 'patron_search_modal_manager_table', callback => 'select_manager' + empty_table_settings => 1 %] [% END %]