From f1b7846a89a4f5c54d79d7d88f4f158915160851 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
- Add translated notice
Sponsored-by: Catalyst IT
https://bugs.koha-community.org/show_bug.cgi?id=23528
---
...lAddressForPatronRegistrations_sysprefs.pl | 21 ++++++++++---------
.../mysql/en/mandatory/sample_notices.yml | 21 ++++++++++---------
.../fr-FR/1-Obligatoire/sample_notices.sql | 16 ++++++++++++++
3 files changed, 38 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 953d158355..6834d911a1 100644
--- a/installer/data/mysql/en/mandatory/sample_notices.yml
+++ b/installer/data/mysql/en/mandatory/sample_notices.yml
@@ -1646,16 +1646,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 %]"
- "
"
- ""
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
index fa662135bb..755dc40157 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql
@@ -503,3 +503,19 @@ INSERT IGNORE INTO letter (module, code, name, title, content, message_transport
[% END %]
[% END %]
", 'email');
+
+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:
+
+ - [% 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')
--
2.20.1