From c119aa0cf23adbdb30d6cd23dc43ff095006c5c1 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 21 Mar 2023 01:04:18 +0000 Subject: [PATCH] Bug 33260: Add NoticesManagement system preference Signed-off-by: Laura Escamilla Signed-off-by: kelly Signed-off-by: David Nind Signed-off-by: Martin Renvoize --- .../bug_33260_-_add_NoticesManagement_syspref.pl | 16 ++++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/patrons.pref | 8 +++++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_33260_-_add_NoticesManagement_syspref.pl diff --git a/installer/data/mysql/atomicupdate/bug_33260_-_add_NoticesManagement_syspref.pl b/installer/data/mysql/atomicupdate/bug_33260_-_add_NoticesManagement_syspref.pl new file mode 100644 index 00000000000..cf2228dd41a --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_33260_-_add_NoticesManagement_syspref.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "33260", + description => "Show message queue on staff interface and make notices printable", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('NoticesManagement', '0', NULL, 'Enable the interface to view and print generated notices', 'YesNo') } + ); + + say $out "Added system preference 'NoticesManagement'"; + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 90702d6aff8..22976164477 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -435,6 +435,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('NotHighlightedWords','and|or|not',NULL,'List of words to NOT highlight when OpacHitHighlight is enabled','free'), ('NoticeBcc','','','Email address to bcc outgoing notices sent by email','free'), ('NoticesLog','0',NULL,'If enabled, log changes to notice templates','YesNo'), +('NoticesManagement','0',NULL,'Enable the interface to view and print generated notices','YesNo'), ('NotifyBorrowerDeparture','30',NULL,'Define number of days before expiry where circulation is warned about patron account expiry','Integer'), ('NotifyPasswordChange','1',NULL,'Notify patrons whenever their password is changed.','YesNo'), ('NovelistSelectEnabled','0',NULL,'Enable Novelist Select content. Requires Novelist Profile and Password','YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref index 671b4f4d416..8e4596d83de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -272,6 +272,12 @@ Patrons: never: never preferences: according to patron messaging preferences cron: (Deprecated) according to --send-notices cron switch + - + - pref: NoticesManagement + choices: + 1: Enable + 0: Disable + - the interface to view and print generated notices. Patron forms: - - "The following database columns must be filled in on the patron entry screen:" @@ -523,4 +529,4 @@ Patrons: homebranch: "Home library" location: "Location" itemcallnumber: "Item's callnumber" - ccode: "Collection" + ccode: "Collection" \ No newline at end of file -- 2.48.1