From 192ea5e0e1c024f02744e22435c176c326fc06da Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 8 Mar 2022 16:01:44 +0000 Subject: [PATCH] Bug 30237: Replace ACCDETAILS notice with WELCOME notice This patch drops the ACCDETAILS notice in preference to a new WELCOME notice. --- .../data/mysql/atomicupdate/bug_30237.pl | 13 ++++++ .../mysql/en/mandatory/sample_notices.yml | 43 +++++++++---------- 2 files changed, 33 insertions(+), 23 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_30237.pl diff --git a/installer/data/mysql/atomicupdate/bug_30237.pl b/installer/data/mysql/atomicupdate/bug_30237.pl new file mode 100644 index 0000000000..9f33af64b2 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30237.pl @@ -0,0 +1,13 @@ +use Modern::Perl; + +return { + bug_number => "30237", + description => "Replace ACCDETAILS notice with WELCOME notice", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + # Add WELCOME notice + $dbh->do( q{ + INSERT IGNORE INTO letter (module, code, name, is_html, title, content, message_transport_type) VALUES ('members', 'WELCOME', 'Welcome notice', 1, '[% USE Koha %]Welcome to [% Koha.Preference('LibraryName') %]', "[% USE Koha %]\r\nHello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %].\r\n\r\nThankyou for joining [% Koha.Preference('LibraryName') %]\r\n\r\nThe library's catalog can be found here.\r\n\r\nYour library card number is [% borrower.cardnumber %]\r\n\r\nIf you have any problems or questions regarding your account, please contact your Koha Administrator.", 'email');}); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 96995aba54..173ffcb9db 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -948,29 +948,6 @@ tables: - "[% branch.branchillemail %]" - "[% branch.branchemail %]" - - module: members - code: ACCTDETAILS - branchcode: "" - name: "Account details template - DEFAULT" - is_html: 0 - title: "Your new Koha account details." - message_transport_type: email - lang: default - content: - - "Hello <> <> <>." - - "" - - "Your new Koha account details are:" - - "" - - "User: <>" - - "" - - "If you have any problems or questions regarding your account, please contact your Koha Administrator." - - "" - - "If you do not have your account password, please contact your Koha Administrator." - - "" - - "Thank you," - - "Koha Administrator" - - "kohaadmin@yoursite.org" - - module: members code: DISCHARGE branchcode: "" @@ -1086,6 +1063,26 @@ tables: - "" - "Your library." + - module: members + code: WELCOME + branchcode: "" + name: "Welcome notice " + is_html: 1 + title: "[% USE Koha %]Welcome to [% Koha.Preference('LibraryName') %]" + message_transport_type: email + lang: default + content: + - "[% USE Koha %]" + - "Hello [% borrower.title %] [% borrower.firstname %] [% borrower.surname %]." + - "" + - "Thankyou for joining [% Koha.Preference('LibraryName') %]" + - "" + - "The library's catalog can be found here." + - "" + - "Your library card number is [% borrower.cardnumber %]" + - "" + - "If you have any problems or questions regarding your account, please contact your Koha Administrator." + - module: orderacquisition code: ACQORDER branchcode: "" -- 2.20.1