diff --git a/installer/data/mysql/atomicupdate/bug_35267.pl b/installer/data/mysql/atomicupdate/bug_35267.pl new file mode 100755 index 0000000000..bee58b7770 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_35267.pl @@ -0,0 +1,42 @@ +use Modern::Perl; + +return { + bug_number => "35267", + description => "Enhance NoticeCSS preferences", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Do you stuffs here + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES + ('AllNoticeStylesheet', '', NULL, 'Enter the address for a stylesheet for all notices', 'free'), + ('AllNoticeCSS','',NULL,'CSS to include in each html notice regardless of messate transport type','free'), + ('EmailNoticeCSS','',NULL,'CSS to include in each html email notice','free'), + ('PrintNoticeCSS','',NULL,'CSS to include in each html print notice','free'), + ('PrintSlipCSS','',NULL,'CSS to include in each html print notice','free') + } + ); + say $out "Added new system preference 'AllNoticeStylesheet'"; + say $out "Added new system preference 'AllNoticeCSS'"; + say $out "Added new system preference 'EmailNoticeCSS'"; + say $out "Added new system preference 'PrintNoticeCSS'"; + say $out "Added new system preference 'PrintSlipCSS'"; + + $dbh->do( + q{ + UPDATE systempreferences SET variable='EmailNoticeStylesheet' WHERE variable='NoticeCSS' + } + ); + say $out "Rename system preference 'NoticeCSS' to 'EmailNoticeStylesheet'"; + + $dbh->do( + q{ + UPDATE systempreferences SET variable='PrintSlipStylesheet' WHERE variable='SlipCSS' + } + ); + say $out "Rename system preference 'SlipCSS' to 'PrintSlipStylesheet'"; + + }, +}; diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 38f7a9806b..8cc184b814 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -27,6 +27,7 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES ('AggressiveMatchOnISBN','0'), ('AggressiveMatchOnISSN','0'), ('AllFinesNeedOverride','1'), +('AllNoticeCSS',''), ('AllowAllMessageDeletion','0'), ('AllowCheckoutNotes', '0'), ('AllowFineOverride','0'), @@ -255,6 +256,8 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES ('EmailFieldSelection',''), ('emailLibrarianWhenHoldIsPlaced','0'), ('EmailOverduesNoEmail','1'), +('EmailNoticeCSS',''), +('EmailNoticeStylesheet',''), ('EmailPatronRegistrations', '0'), ('EmailPatronWhenHoldIsPlaced', '0'), ('EmailPurchaseSuggestions','0'), @@ -662,8 +665,12 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES ('PreserveSerialNotes','1'), ('PreventWithdrawingItemsStatus', ''), ('previousIssuesDefaultSortOrder','asc'), +('PrintNoticeCSS',''), ('PrintNoticesMaxLines','0'), ('PrivacyPolicyConsent',''), +('PrintNoticeStylesheet',''), +('PrintSlipCSS',''), +('PrintSlipStylesheet',''), ('PrivacyPolicyURL',''), ('ProcessingFeeNote', ''), ('ProtectSuperlibrarianPrivileges','1'),