From 4aa17a1935e92234dfac6798733bf907982b040c 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..576c57e2e5d
--- /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:
+
+- <> <>
+- Cardnumber: <>
+- Email: <>
+- Phone: <>
+- Mobile: <>
+- Fax: <>
+- Secondary email: <>
+- Secondary phone: <>
+- Home library: <>
+- Temporary patron category: <>
+
+
+Use this link to verify the account: <>/cgi-bin/koha/opac-registration-verify.pl?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..052af3dc7e1 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:
"
+ - ""
+ - "- <> <>
"
+ - "- Cardnumber: <>
"
+ - "- Email: <>
"
+ - "- Phone: <>
"
+ - "- Mobile: <>
"
+ - "- Fax: <>
"
+ - "- Secondary email: <>
"
+ - "- Secondary phone: <>
"
+ - "- Home library: <>
"
+ - "- Temporary patron category: <>
"
+ - "
"
+ - ""
+ - "Use this link to verify the account: <>/cgi-bin/koha/opac-registration-verify.pl?token=<>
"
--
2.39.5