From ac75a79aae0d6d0ce55dd628634d43b60f1c7ea2 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Tue, 30 May 2023 21:58:49 +0000 Subject: [PATCH] Bug 26597: (QA follow-up) Remane select_user and add missing filters --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- .../intranet-tmpl/prog/en/modules/members/memberentrygen.tt | 6 +++--- koha-tmpl/intranet-tmpl/prog/js/members.js | 2 +- 3 files changed, 5 insertions(+), 5 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 6ae5ebb9e2..fcb7213c48 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -847,7 +847,7 @@ [% IF callback %] p.[% callback | html %](borrowernumber, data); [% ELSE %] - p.select_user(borrowernumber, data); + p.add_guarantor(borrowernumber, data); [% END %] } window.close(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt index 140471db0e..f85d3f70c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt @@ -1761,7 +1761,7 @@ legend:hover { [% IF new_guarantors %] [% FOREACH g IN new_guarantors %] - select_user( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' ); + add_guarantor( '[% g.patron.borrowernumber | html %]', [% To.json( g.patron.unblessed ) | $raw %], '[% g.relationship | html %]' ); [% END %] [% END %] @@ -1922,10 +1922,10 @@ legend:hover { var prefill_fields; var to_api_mapping; [% IF prefill_fields %] - prefill_fields = [% To.json(prefill_fields)%]; + prefill_fields = [% To.json(prefill_fields) | $raw %]; [% END %] [% IF to_api_mapping %] - to_api_mapping = [% To.json(to_api_mapping) %]; + to_api_mapping = [% To.json(to_api_mapping) | $raw %]; [% END %] var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %]; diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js index 576353400c..e49d2bbd68 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/members.js +++ b/koha-tmpl/intranet-tmpl/prog/js/members.js @@ -76,7 +76,7 @@ function update_category_code(category_code) { hint.html(hint_string); } -function select_user(borrowernumber, borrower, relationship) { +function add_guarantor(borrowernumber, borrower, relationship) { let is_guarantor = $(`.guarantor-details[data-borrowernumber=${borrowernumber}]`).length; if ( is_guarantor ) { -- 2.34.1