From 4a000cbf370a3c0043aabe1b1e032191ebc87903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nazl=C4=B1=20=C3=87etin?= Date: Wed, 19 Dec 2018 13:41:30 +0000 Subject: [PATCH] Bug 5770: New system pref for new suggestion email --- installer/data/mysql/atomicupdate/bug_5770.sql | 30 ++++++++++++++++++++++ installer/data/mysql/sysprefs.sql | 2 ++ .../prog/en/modules/admin/preferences/admin.pref | 11 ++++++++ 3 files changed, 43 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_5770.sql diff --git a/installer/data/mysql/atomicupdate/bug_5770.sql b/installer/data/mysql/atomicupdate/bug_5770.sql new file mode 100644 index 00000000000..0d27abf343d --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_5770.sql @@ -0,0 +1,30 @@ +INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES +('EmailPurchaseSuggestions','KohaAdminEmailAddress','EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that will be sent new purchase suggestions','Choice'), +('EmailAddressForSuggestions','','','If you choose EmailAddressForSuggestions you should enter a valid email address','free'); + +INSERT IGNORE INTO `letter` (module, code, name, title, content, is_html, message_transport_type) +VALUES ('suggestions','NEW_SUGGESTION','New suggestion','New Suggestion','

Suggestion pending approval

+

Suggested by

+ +

+

Item on suggestion

+ +

',1, 'email'); diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 1e36c306c61..572fcd5b097 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -156,6 +156,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ElasticsearchIndexStatus_authorities', '0', 'Authorities index status', NULL, NULL), ('ElasticsearchIndexStatus_biblios', '0', 'Biblios index status', NULL, NULL), ('emailLibrarianWhenHoldIsPlaced','0',NULL,'If ON, emails the librarian whenever a hold is placed','YesNo'), +('EmailPurchaseSuggestions','KohaAdminEmailAddress','EmailAddressForSuggestions|BranchEmailAddress|KohaAdminEmailAddress','Choose email address that will be sent new purchase suggestions','Choice'), +('EmailAddressForSuggestions','','','If you choose EmailAddressForSuggestions you should enter a valid email address','free'), ('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'), ('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index 464c8c8e6ab..dc2ff58b217 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -7,6 +7,17 @@ Administration: class: email - "(This is the default From: address for emails unless there is one for the particular library, and is referred to when an internal error occurs.)" - + - "Choose email address that will be sent new purchase suggestions : " + - pref: EmailPurchaseSuggestions + default: KohaAdminEmailAddress + choices: + EmailAddressForSuggestions: EmailAddressForSuggestions + BranchEmailAddress: email address of branch + KohaAdminEmailAddress: KohaAdminEmailAddress + - "If you choose EmailAddressForSuggestions you should enter a valid email address : " + - pref: EmailAddressForSuggestions + class: email + - - "Email address to be set as the replyto in emails: " - pref: ReplytoDefault class: email -- 2.11.0