@@ -, +, @@ - CookieConsent - the master on/off for this functionality - ConsentJS - The configuration for JS code that requires consent prior to running. - CookieConsentBar: Allows the admin to specify the HTML that will be - CookieConsentPopup: Allows the admin to specify the HTML that will be --- .../bug_27378_add_ConsentJS_syspref.perl | 8 +++++++ ...ug_27378_add_CookieConsentBar_syspref.perl | 8 +++++++ ..._27378_add_CookieConsentPopup_syspref.perl | 8 +++++++ .../bug_27378_add_CookieConsent_syspref.perl | 8 +++++++ installer/data/mysql/mandatory/sysprefs.sql | 4 ++++ .../en/modules/admin/preferences/patrons.pref | 24 +++++++++++++++++++ 6 files changed, 60 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_27378_add_ConsentJS_syspref.perl create mode 100644 installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentBar_syspref.perl create mode 100644 installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentPopup_syspref.perl create mode 100644 installer/data/mysql/atomicupdate/bug_27378_add_CookieConsent_syspref.perl --- a/installer/data/mysql/atomicupdate/bug_27378_add_ConsentJS_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_27378_add_ConsentJS_syspref.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('ConsentJS', '', 'Specify Javascript that requires user consent to run (e.g. tracking code)', '', 'Free'); | ); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 27378 - Add ConsentJS syspref)\n"; +} --- a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentBar_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentBar_syspref.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q{ INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentBar', '', 'Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen', '70|10', 'Textarea'); } ); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 27378 - Add CookieConsentBar syspref)\n"; +} --- a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentPopup_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsentPopup_syspref.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentPopup', '', 'Show the following HTML in the cookie consent popup', '70|10', 'Textarea'); | ); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 27378 - Add CookieConsentPopup syspref)\n"; +} --- a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsent_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_27378_add_CookieConsent_syspref.perl @@ -0,0 +1,8 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsent', '0', 'Require cookie consent to be displayed', '', 'YesNo'); | ); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 27378 - Add CookieConsent syspref)\n"; +} --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -140,7 +140,11 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('COinSinOPACResults','1','','If ON, use COinS in OPAC search results page. NOTE: this can slow down search response time significantly','YesNo'), ('CollapseFieldsPatronAddForm','',NULL,'Collapse these fields by default when adding a new patron. These fields can still be expanded.','Multiple'), ('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'), +('ConsentJS', '', NULL, 'Specify Javascript that requires user consent to run (e.g. tracking code)', 'Free'), ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), +('CookieConsent', '0', NULL, 'Require cookie consent to be displayed', 'YesNo'), +('CookieConsentBar', '', '70|10', 'Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen', 'Textarea'), +('CookieConsentPopup', '', '70|10', 'Show the following HTML in the cookie consent popup', 'Textarea'), ('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'), ('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'), ('CurrencyFormat','US','US|FR|CH','Determines the display format of currencies. eg: \'36000\' is displayed as \'360 000,00\' in \'FR\' or \'360,000.00\' in \'US\'.','Choice'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -349,6 +349,30 @@ Patrons: - days and remove anonymized patron accounts after - pref: PatronRemovalDelay - "days.
IMPORTANT: No action is performed when these delays are empty (no text). But a zero value ('0') is interpreted as no delay (do it now)! The actions are performed by the cleanup database cron job." + - + - pref: CookieConsent + choices: + yes: Require + no: "Don't require" + - cookie consent to be displayed + - + - Specify Javascript that requires user consent to run (e.g. tracking code) + - pref: ConsentJS + type: modaljs + initiator: populateConsentJS + processor: prepareConsentJS + - + - Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen + - pref: CookieConsentBar + type: textarea + syntax: text/html + class: code + - + - Show the following HTML in the cookie consent popup + - pref: CookieConsentPopup + type: textarea + syntax: text/html + class: code Security: - - Login passwords for staff and patrons must be at least --