From a7fec3595c379afae2f42d9f110b2917d2b2d1f0 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 4 Nov 2024 00:48:58 +0000 Subject: [PATCH] Bug 25090: Add OPAC_REG_VERIFY_LIB notice This is a bit of a merge between the OPAC_REG and OPAC_REG_VERIFY notices that the EmailPatronRegistrations address would receive if PatronSelfRegistrationVerifyByEmail was set to need that verification Sponsored-by: Mental Health Education & Resource Centre --- ..._25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl | 30 +++++++++++++++++++ .../mysql/en/mandatory/sample_notices.yml | 26 ++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl diff --git a/installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl b/installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl new file mode 100644 index 00000000000..9502ec8605b --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_25090_-_add_OPAC_REG_VERIFY_LIB_notice.pl @@ -0,0 +1,30 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_failure say_success say_info); + +return { + bug_number => "25090", + description => "Redirect self-registration verification email to the library", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO letter (module, code, branchcode, name, is_html, title, message_transport_type, lang, content) VALUES ("members", "OPAC_REG_VERIFY_LIB", "", "New OPAC self-registration submitted for verification", 1, "Verify new OPAC self-registration", "email", "default", "

New OPAC self-registration submitted for verification

+

Self-registration made:

+ +

+

Click this link to verify the account: [% Koha.Preference('OPACBaseURL') %]/cgi-bin/koha/opac-registration-verify.pl?token=[% borrower_modification.verification_token %]

")}); + + say_success( $out, "Added notice 'OPAC_REG_VERIFY_LIB'" ); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index e054a5a0fa9..55858d59e72 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -2649,3 +2649,29 @@ tables: - "[% skipped %] records skipped" - "[% in_error %] records in error" - "[% total %] total" + + - module: members + code: OPAC_REG_VERIFY_LIB + branchcode: "" + name: "New OPAC self-registration submitted for verification" + is_html: 1 + title: "Verify new OPAC self-registration" + message_transport_type: email + lang: default + content: + - "

New OPAC self-registration submitted for verification

" + - "

Self-registration made:

" + - "" + - "

" + - "

Click this link to verify the account: [% Koha.Preference('OPACBaseURL') %]/cgi-bin/koha/opac-registration-verify.pl?token=[% borrower_modification.verification_token %]

" -- 2.39.5