Koha/installer/data/mysql/db_revs/220600054.pl
Tomas Cohen Arazi da6426ad8b
Bug 23538: DBRev 22.06.00.054
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-09-23 09:42:05 -03:00

29 lines
2 KiB
Perl
Executable file

use Modern::Perl;
return {
bug_number => "23538",
description => "Add new system preferences EmailPatronRegistrations and EmailAddressForPatronRegistrations and new OPAC_REG letter",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('EmailPatronRegistrations', '0', '0|EmailAddressForPatronRegistrations|BranchEmailAddress|KohaAdminEmailAddress', 'Choose email address that new patron registrations will be sent to: ', 'Choice'), ('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free') });
$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:</h4>
<ul>
<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') });
},
};