From 007a20bd1ae9a04ad13d5db9eeaefa4cfb84432e 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 --- ...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

+ +

', 'email', 'default') }); + }, +}; diff --git a/installer/data/mysql/en/mandatory/sample_notices.yml b/installer/data/mysql/en/mandatory/sample_notices.yml index 0af93cd37b..121276dbbc 100644 --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ b/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1635,3 +1635,28 @@ tables: - "Callnumber: <>" - "Waiting since: <>" - "Notes: <>" + + - 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 9a4cdbf72f..5490a5fe92 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -191,9 +191,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 82ad87630f..0bb926f0c4 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 @@ -849,6 +849,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.20.1