Bug 23538: (follow-up) Fix up notices
authorAlex Buckley <alexbuckley@catalyst.net.nz>
Wed, 6 Apr 2022 12:40:01 +0000 (12:40 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 23 Sep 2022 12:37:54 +0000 (09:37 -0300)
- Add toolkit template (TT) syntax to notices
- Add TT conditionals to notices

Sponsored-by: Catalyst IT
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl
installer/data/mysql/en/mandatory/sample_notices.yml

index 55082df..daa80ba 100755 (executable)
@@ -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',
             '<h3>New OPAC self-registration</h3>
-            <p><h4>Self-registration made by</h4>
+            <p><h4>Self-registration made:</h4>
             <ul>
-            <li><<borrowers.firstname>> <<borrowers.surname>></li>
-            <li>Email: <<borrowers.email>></li>
-            <li>Phone: <<borrowers.phone>></li>
-            <li>Mobile: <<borrowers.mobile>></li>
-            <li>Fax: <<borrowers.fax>></li>
-            <li>Secondary email: <<borrowers.emailpro>></li>
-            <li>Secondary phone:<<borrowers.phonepro>></li>
-            <li>Home library: <<borrowers.branchcode>></li>
-            <li>Patron category: <<borrowers.categorycode>></li>
+            <li>[% borrower.firstname %] [% borrower.surname %]</li>
+            [% IF borrower.cardnumber %]<li>Cardnumber: [% borrower.cardnumber %]</li>[% END %]
+            [% IF borrower.email %]<li>Email: [% borrower.email %]</li>[% END %]
+            [% IF borrower.phone %]<li>Phone: [% borrower.phone %]</li>[% END %]
+            [% IF borrower.mobile %]<li>Mobile: [% borrower.mobile %]</li>[% END %]
+            [% IF borrower.fax %]<li>Fax: [% borrower.fax %]</li>[% END %]
+            [% IF borrower.emailpro %]<li>Secondary email: [% borrower.emailpro %]</li>[% END %]
+            [% IF borrower.phonepro %]<li>Secondary phone:[% borrower.phonepro %]</li>[% END %]
+            [% IF borrower.branchcode %]<li>Home library: [% borrower.branchcode %]</li>[% END %]
+            [% IF borrower.categorycode %]<li>Patron category: [% borrower.categorycode %]</li>[% END %]
             </ul>
             </p>', 'email', 'default') });
     },
index 53a7e2a..8b8cf3a 100644 (file)
@@ -1901,16 +1901,17 @@ tables:
           lang: default
           content:
             - "<h3>New OPAC self-registration</h3>"
-            - "<p><h4>Self-registration made by</h4>"
+            - "<p><h4>Self-registration made:</h4>"
             - "<ul>"
-            - "<li><<borrowers.firstname>> <<borrowers.surname>></li>"
-            - "<li>Email: <<borrowers.email>></li>"
-            - "<li>Phone: <<borrowers.phone>></li>"
-            - "<li>Mobile: <<borrowers.mobile>></li>"
-            - "<li>Fax: <<borrowers.fax>></li>"
-            - "<li>Secondary email: <<borrowers.emailpro>></li>"
-            - "<li>Secondary phone:<<borrowers.phonepro>></li>"
-            - "<li>Home library: <<borrowers.branchcode>></li>"
-            - "<li>Temporary patron category: <<borrowers.categorycode>></li>"
+            - "<li> [% borrower.firstname %] [% borrower.surname %]</li>"
+            - "[% IF borrower.cardnumber %]<li>Cardnumber: [% borrower.cardnumber %]</li>[% END %]"
+            - "[% IF borrower.email %]<li>Email: [% borrower.email %]</li>[% END %]"
+            - "[% IF borrower.phone %]<li>Phone: [% borrower.phone %]</li>[% END %]"
+            - "[% IF borrower.mobile %]<li>Mobile: [% borrower.mobile %]</li>[% END %]"
+            - "[% IF borrower.fax %]<li>Fax: [% borrower.fax %]</li>[% END %]"
+            - "[% IF borrower.emailpro %]<li>Secondary email: [% borrower.emailpro %]</li>[% END %]"
+            - "[% IF borrower.phonepro %]<li>Secondary phone: [% borrower.phonepro %]</li>[% END %]"
+            - "[% IF borrower.branchcode %]<li>Home library: [% borrower.branchcode %]</li>[% END %]"
+            - "[% IF borrower.categorycode %]<li>Temporary patron category: [% borrower.categorycode %]</li>[% END %]"
             - "</ul>"
             - "</p>"