Bug 23538: Email library when new patron self-registers
[koha.git] / installer / data / mysql / atomicupdate / bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "23538",
5     description => "Add new system preferences EmailPatronRegistrations and EmailAddressForPatronRegistrations and new OPAC_REG letter",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9
10         $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') });
11
12         $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',
13             '<h3>New OPAC self-registration</h3>
14             <p><h4>Self-registration made by</h4>
15             <ul>
16             <li><<borrowers.firstname>> <<borrowers.surname>></li>
17             <li>Email: <<borrowers.email>></li>
18             <li>Phone: <<borrowers.phone>></li>
19             <li>Mobile: <<borrowers.mobile>></li>
20             <li>Fax: <<borrowers.fax>></li>
21             <li>Secondary email: <<borrowers.emailpro>></li>
22             <li>Secondary phone:<<borrowers.phonepro>></li>
23             <li>Home library: <<borrowers.branchcode>></li>
24             <li>Patron category: <<borrowers.categorycode>></li>
25             </ul>
26             </p>', 'email', 'default') });
27     },
28 };