From f5114fbd426e1f9aed4680dbde6bab55fa5ad5c2 Mon Sep 17 00:00:00 2001
From: Alex Buckley
Date: Wed, 6 Apr 2022 12:40:01 +0000
Subject: [PATCH] Bug 23538: (follow-up) Fix up notices
- Add toolkit template (TT) syntax to notices
- Add TT conditionals to notices
Sponsored-by: Catalyst IT
Signed-off-by: David Nind
Signed-off-by: Katrin Fischer
Signed-off-by: Tomas Cohen Arazi
---
...lAddressForPatronRegistrations_sysprefs.pl | 21 ++++++++++---------
.../mysql/en/mandatory/sample_notices.yml | 21 ++++++++++---------
2 files changed, 22 insertions(+), 20 deletions(-)
diff --git a/installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl b/installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl
index 55082df006..daa80ba933 100755
--- a/installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl
+++ b/installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl
@@ -11,17 +11,18 @@ return {
$dbh->do(q{INSERT IGNORE INTO letter (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ( 'members', 'OPAC_REG', '', 'New OPAC self-registration submitted', 1, 'New OPAC self-registration',
'New OPAC self-registration
- Self-registration made by
+ Self-registration made:
- - <> <>
- - Email: <>
- - Phone: <>
- - Mobile: <>
- - Fax: <>
- - Secondary email: <>
- - Secondary phone:<>
- - Home library: <>
- - Patron category: <>
+ - [% borrower.firstname %] [% borrower.surname %]
+ [% IF borrower.cardnumber %]- Cardnumber: [% borrower.cardnumber %]
[% END %]
+ [% IF borrower.email %]- Email: [% borrower.email %]
[% END %]
+ [% IF borrower.phone %]- Phone: [% borrower.phone %]
[% END %]
+ [% IF borrower.mobile %]- Mobile: [% borrower.mobile %]
[% END %]
+ [% IF borrower.fax %]- Fax: [% borrower.fax %]
[% END %]
+ [% IF borrower.emailpro %]- Secondary email: [% borrower.emailpro %]
[% END %]
+ [% IF borrower.phonepro %]- Secondary phone:[% borrower.phonepro %]
[% END %]
+ [% IF borrower.branchcode %]- Home library: [% borrower.branchcode %]
[% END %]
+ [% IF borrower.categorycode %]- Patron category: [% borrower.categorycode %]
[% END %]
', 'email', 'default') });
},
diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml
index 53a7e2a068..8b8cf3aee1 100644
--- a/installer/data/mysql/en/mandatory/sample_notices.yml
+++ b/installer/data/mysql/en/mandatory/sample_notices.yml
@@ -1901,16 +1901,17 @@ tables:
lang: default
content:
- "New OPAC self-registration
"
- - "Self-registration made by
"
+ - "Self-registration made:
"
- ""
- - "- <> <>
"
- - "- Email: <>
"
- - "- Phone: <>
"
- - "- Mobile: <>
"
- - "- Fax: <>
"
- - "- Secondary email: <>
"
- - "- Secondary phone:<>
"
- - "- Home library: <>
"
- - "- Temporary patron category: <>
"
+ - "- [% borrower.firstname %] [% borrower.surname %]
"
+ - "[% IF borrower.cardnumber %]- Cardnumber: [% borrower.cardnumber %]
[% END %]"
+ - "[% IF borrower.email %]- Email: [% borrower.email %]
[% END %]"
+ - "[% IF borrower.phone %]- Phone: [% borrower.phone %]
[% END %]"
+ - "[% IF borrower.mobile %]- Mobile: [% borrower.mobile %]
[% END %]"
+ - "[% IF borrower.fax %]- Fax: [% borrower.fax %]
[% END %]"
+ - "[% IF borrower.emailpro %]- Secondary email: [% borrower.emailpro %]
[% END %]"
+ - "[% IF borrower.phonepro %]- Secondary phone: [% borrower.phonepro %]
[% END %]"
+ - "[% IF borrower.branchcode %]- Home library: [% borrower.branchcode %]
[% END %]"
+ - "[% IF borrower.categorycode %]- Temporary patron category: [% borrower.categorycode %]
[% END %]"
- "
"
- ""
--
2.39.5