From 0bb2953b593aaa611f22de46029f41d016be432c Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 12 Nov 2024 01:08:59 +0000 Subject: [PATCH] Bug 31391: (follow-up) Include changed requirements of patron autocomplete, datatable Signed-off-by: Pedro Amorim --- .../prog/en/modules/recalls/request.tt | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt index 7bbd2b2603..ef68de5987 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/recalls/request.tt @@ -2,18 +2,17 @@ [% USE Asset %] [% USE Koha %] [% USE KohaDates %] -[% USE TablesSettings %] [% USE Branches %] [% USE Categories %] [% USE AuthorisedValues %] [% USE ItemTypes %] +[% PROCESS 'i18n.inc' %] +[% SET footerjs = 1 %] +[% INCLUDE 'doc-head-open.inc' %] [% SET libraries = Branches.all %] [% SET categories = Categories.all.unblessed %] [% SET columns = ['name', 'cardnumber', 'dateofbirth', 'category', 'branch', 'address', 'phone'] %] [% PROCESS "patron-search.inc" %] -[% PROCESS 'i18n.inc' %] -[% SET footerjs = 1 %] -[% INCLUDE 'doc-head-open.inc' %] [% FILTER collapse %] [% t("Place a recall") | html %] › [% t("Recalls") | html %] › @@ -268,21 +267,27 @@ [% INCLUDE 'calendar.inc' %] [% INCLUDE 'select2.inc' %] [% SET url_biblio_params = "biblionumber=" _ biblio.biblionumber %] - [% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, extended_attribute_types => attribute_type_codes, columns => columns, open_on_row_click => 1, on_click_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_one_result => 1, redirect_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_attribute_equal => 'cardnumber' %] + [% UNLESS patron %] + [% SET search_results_block_id = 'recalls_patronsearch_pane_panel' %] [%# adjusting variable for patron-search.inc %] + [% PROCESS patron_search_js table_id => 'table_borrowers', categories => categories, libraries => libraries, columns => columns, open_on_row_click => 1, on_click_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_one_result => 1, redirect_url => '/cgi-bin/koha/recalls/request.pl?' _ url_biblio_params, redirect_if_attribute_equal => 'cardnumber' %] + <script> + $(document).ready(function(){ + $("#recalls_patronsearch").on("submit", filter); + }); + </script> + [% END %] <script> - table_settings = [% TablesSettings.GetColumns( 'circ', 'circulation', 'table_borrowers', 'json' ) | $raw %]; $.fn.select2.defaults.set("width", "100%" ); $.fn.select2.defaults.set("dropdownAutoWidth", true ); $(document).ready(function(){ - $("#recalls_patronsearch").on("submit", filter); [% UNLESS patron %] [% IF ( PatronAutoComplete ) %] - patron_autocomplete($("#search_patron_filter"), { 'link-to': 'recall', 'url-params': '[% url_biblio_params | url %]' }); + patron_autocomplete($(".search_patron_filter"), { 'link-to': 'recall', 'url-params': '[% url_biblio_params | url %]' }); [% END %] [% END %] $("#items").dataTable($.extend(true, {}, dataTablesDefaults, { - 'bPaginate': false, - "sDom": '<"top pager"ilf>t', + 'paginate': false, + "dom": '<"top pager"ilf>t', })); //Override fieldset styling for dataTables search box -- 2.39.5