From 219ae32c41a24c5de71c7b965dce0b05126d6ec3 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Mon, 4 Apr 2022 07:52:06 +0000 Subject: [PATCH] Bug 23538: Database changes Sponsored-by: Catalyst IT Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- ...lAddressForPatronRegistrations_sysprefs.pl | 29 +++++++++++++++++++ .../mysql/en/mandatory/sample_notices.yml | 25 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 ++ .../en/modules/admin/preferences/opac.pref | 13 +++++++++ 4 files changed, 69 insertions(+) create mode 100755 installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl diff --git a/installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl b/installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl new file mode 100755 index 0000000000..61ee73395e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug23538-add_EmailPatronRegistrations_and_EmailAddressForPatronRegistrations_sysprefs.pl @@ -0,0 +1,29 @@ +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', + '

New OPAC self-registration

+

Self-registration made by

+
    +
  • <> <>
  • +
  • Physical address: <> <> <> <>, <>, <> <>, <>
  • +
  • Email: <>
  • +
  • Phone: <>
  • +
  • Mobile: <>
  • +
  • Fax: <>
  • +
  • Secondary email: <>
  • +
  • Secondary phone:<>
  • +
  • Home library: <>
  • +
  • Temporary patron category: <>
  • +
+

', 'email', 'default') }); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index a6dcdead51..85d2ddce85 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1890,3 +1890,28 @@ tables: - "

This is to confirm that someone enabled two factor authentication on your account.

" - "

If you did not do this, someone else may be using your account. Please contact technical support.

" - "

Your library

" + + - module: members + code: OPAC_REG + branchcode: "" + name: "New OPAC self-registration submitted" + is_html: 1 + title: "New OPAC self-registration" + message_transport_type: email + lang: default + content: + - "

New OPAC self-registration

" + - "

Self-registration made by

" + - "
    " + - "
  • <> <>
  • " + - "
  • Physical address: <> <> <> <>, <>, <> <>, <>
  • " + - "
  • Email: <>
  • " + - "
  • Phone: <>
  • " + - "
  • Mobile: <>
  • " + - "
  • Fax: <>
  • " + - "
  • Secondary email: <>
  • " + - "
  • Secondary phone:<>
  • " + - "
  • Home library: <>
  • " + - "
  • Temporary patron category: <>
  • " + - "
" + - "

" diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 617d34b814..db99d68f81 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -202,9 +202,11 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL), ('ElasticsearchMARCFormat', 'ISO2709', 'ISO2709|ARRAY', 'Elasticsearch MARC format. ISO2709 format is recommended as it is faster and takes less space, whereas array is searchable.', 'Choice'), ('ElasticsearchCrossFields', '1', '', 'Enable "cross_fields" option for searches using Elastic search.', 'YesNo'), +('EmailAddressForPatronRegistrations', '', '', ' If you choose EmailAddressForPatronRegistrations you have to enter a valid email address: ', 'free'), ('EmailAddressForSuggestions','','',' If you choose EmailAddressForSuggestions you have to enter a valid email address: ','free'), ('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'), ('EmailOverduesNoEmail','1',NULL,'Send send overdues of patrons without email address to staff','YesNo'), +('EmailPatronRegistrations', '0', '0|EmailAddressForPatronRegistrations|BranchEmailAddress|KohaAdminEmailAddress', 'Choose email address that new patron registrations will be sent to: ', 'Choice'), ('EmailPurchaseSuggestions','0','0|EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that new purchase suggestions will be sent to: ','Choice'), ('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'), ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 726fb16c4f..51e7b5d33c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -865,6 +865,19 @@ OPAC: 1: Allow 0: "Don't allow" - patrons to notify the library of changes to their contact information from the OPAC. + - + - "Choose email address that new patron self-registrations will be sent to: " + - pref: EmailPatronRegistrations + default: 0 + choices: + 0: none + EmailAddressForPatronRegistrations: EmailAddressForPatronRegistrations + BranchEmailAddress: email address of branch + KohaAdminEmailAddress: KohaAdminEmailAddress + - 'If you chooose EmailAddressForPatronRegistrations you have to enter a valid email address: ' + - + - pref: EmailAddressForPatronRegistrations + class: email Advanced search options: - -- 2.39.5