From 4732d1080900b2437b1d30642e4ec6644ad6c900 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 23 Jan 2024 14:44:27 +0000 Subject: [PATCH] Bug 33457: (QA follow-up) Use js-patron-format instead This patch updates the code to use the $patron_to_html js function rather than replicating it locally.. this means if in the future we introduce further fixes/improvements to the display they're affect here too. Test plan 1) As for the original implementation, confirm the fix is still fixed Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer --- koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt | 3 ++- 2 files changed, 3 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 73cdabc6df..7a391a9392 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc @@ -650,7 +650,7 @@ e.preventDefault(); var borrowernumber = $(this).data("borrowernumber"); var borrower_data = JSON.parse($("#borrower_data"+borrowernumber).val()); - add_user( borrowernumber, ( borrower_data.firstname ? borrower_data.firstname : "" ) + ' ' + ( borrower_data.surname ? borrower_data.surname : "" ) ); + add_user( borrowernumber, $patron_to_html( borrower_data, { display_cardnumber: false, url: false } ) ); }); $("body").on("click",".select_user",function(e){ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt index 64296ed98a..9705f8dc2d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tt @@ -537,6 +537,7 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acq.js") | $raw %] [% IF op == 'add_form' %] + [% INCLUDE 'js-patron-format.inc' %]