From f99bad2f360ca54ae991874519cf4a0fd7eba3dd Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 19 May 2022 12:53:18 +0100 Subject: [PATCH] Bug 30807: Migrate to patron-title in pay and paycollect This patch updates the member-flags template to use the patron-title.inc include wherever patron names are referenced. Test plan 1) Navigate to a patron and click through to their accounts tab 2) Note how the patron name displays in the title, breadcrumb and headings 3) Click through to make a payment 4) Note how the patron name displays in the title, breadcrumb and headings 5) Apply the patch and reload the page 6) Confirm the patron name still appears in each location and is consistently formatted and linked as you would expect Note: This patch also removes a superflous hidden title form element that was simply passed to and from the controller but not actually used in any way. Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit c3fd42b5507af58d0f12a2bb36f3fb62df54865d) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt | 6 +++--- .../intranet-tmpl/prog/en/modules/members/paycollect.tt | 8 +++----- members/paycollect.pl | 2 -- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt index c6978f3cfb..577e552843 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt @@ -9,7 +9,7 @@ [% SET footerjs = 1 %] [% PROCESS 'accounts.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Make a payment for [% patron.firstname | html %] [% patron.surname | html %] › Patrons › Koha +Make a payment for [% INCLUDE 'patron-title.inc' no_html = 1 %] › Patrons › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -27,7 +27,7 @@
  • - Make a payment for [% patron.firstname | html %] [% patron.surname | html %] + Make a payment for [% INCLUDE 'patron-title.inc' %]
  • @@ -171,7 +171,7 @@ [% ELSE %] -

    [% patron.firstname | html %] [% patron.surname | html %] has no outstanding fines.

    +

    [% INCLUDE 'patron-title.inc' %] has no outstanding fines.

    [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt index 6911d5868f..20e588ab18 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt @@ -23,9 +23,9 @@ [% SET registers = Registers.all( filters => { current_branch => 1 } ) %] [% IF type == 'WRITEOFF' %] - Write off an amount for [% patron.firstname | html %] [% patron.surname | html %] + Write off an amount for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% ELSE %] - Collect fine payment for [% patron.firstname | html %] [% patron.surname | html %] + Collect fine payment for [% INCLUDE 'patron-title.inc' no_html = 1 %] [% END %] › Patrons › Koha [% INCLUDE 'doc-head-close.inc' %] @@ -44,7 +44,7 @@ Patrons
  • - Pay charges for [% patron.firstname | html %] [% patron.surname | html %] + Pay charges for [% INCLUDE 'patron-title.inc' %]
  • @@ -141,7 +141,6 @@ -
    @@ -235,7 +234,6 @@ - diff --git a/members/paycollect.pl b/members/paycollect.pl index 3f6d1f4c8b..e8301a7660 100755 --- a/members/paycollect.pl +++ b/members/paycollect.pl @@ -87,14 +87,12 @@ if ( $pay_individual || $writeoff_individual ) { my $amountoutstanding = $input->param('amountoutstanding'); my $itemnumber = $input->param('itemnumber'); my $description = $input->param('description'); - my $title = $input->param('title'); $total_due = $amountoutstanding; $template->param( debit_type_code => $debit_type_code, accountlines_id => $accountlines_id, amount => $amount, amountoutstanding => $amountoutstanding, - title => $title, itemnumber => $itemnumber, individual_description => $description, payment_note => $payment_note, -- 2.39.5