From c37ca7fe1f008c0cb09f802f5cd797383516a880 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 14 Mar 2023 15:07:46 +0000 Subject: [PATCH] Bug 33223: Replace 'first_valid' with 'notice' for email addresses This patch replaces the uses of first_valid_email_address with notice_email_address in waiting_holds, transferstoreceive, clubs and sendbasket so that we take EmailFieldPrimary into account for these notices too. --- koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc | 6 +++--- .../prog/en/modules/circ/transferstoreceive.tt | 6 +++--- koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt | 2 +- opac/opac-sendbasket.pl | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc index e6caa50f4a..2893d0acbb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc @@ -54,9 +54,9 @@ [% INCLUDE 'patron-title.inc' patron=reserveloo.borrower invert_name=1 no_title=1 %] [% IF ( reserveloo.borrower.phone ) %]
[% reserveloo.borrower.phone | html %][% END %] - [% IF ( reserveloo.borrower.first_valid_email_address ) %] -
- [% reserveloo.borrower.first_valid_email_address | html %]
+ [% IF ( reserveloo.borrower.notice_email_address ) %] +
+ [% reserveloo.borrower.notice_email_address | html %]
[% END %] [% Branches.GetName( reserveloo.item.homebranch ) | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt index 2834af58b9..95879243d5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt @@ -79,11 +79,11 @@ [% reser.patron.surname | html %][%IF ( reser.patron.firstname ) %], [% reser.patron.firstname | html %][% END %] [% IF ( reser.patron.phone ) %]
[% reser.patron.phone | html %][% END %] - [% IF ( reser.patron.first_valid_email_address ) %] + [% IF ( reser.patron.notice_email_address ) %]
[% BLOCK subject %]Hold:[% END %] - - [% reser.patron.first_valid_email_address | html %] + + [% reser.patron.notice_email_address | html %] [% END %] [% ELSIF ( reser.recall ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt index 4358d097a3..b18cd068d4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt @@ -55,7 +55,7 @@ [% c.name | html %] [% c.description | html %] - [% IF !c.club_template.is_email_required || ( c.club_template.is_email_required && borrower.first_valid_email_address ) %] + [% IF !c.club_template.is_email_required || ( c.club_template.is_email_required && borrower.notice_email_address ) %] diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl index 278cfd34a6..a71034dcc0 100755 --- a/opac/opac-sendbasket.pl +++ b/opac/opac-sendbasket.pl @@ -54,7 +54,7 @@ if ( $email_add ) { token => scalar $query->param('csrf_token'), }); my $patron = Koha::Patrons->find( $borrowernumber ); - my $user_email = $patron->first_valid_email_address + my $user_email = $patron->notice_email_address || C4::Context->preference('KohaAdminEmailAddress'); my $email_replyto = $patron->firstname . " " . $patron->surname . " <$user_email>"; -- 2.39.2