From f449114f38e775e6941c1df6f0ccc5cb5b62f72e 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 --- 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 715e0db2b4..26a36f8951 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 c6b95bb33c..6b9ef7a082 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' %]