@@ -, +, @@ --- Koha/Template/Plugin/JSConsents.pm | 4 ++-- installer/data/mysql/mandatory/sysprefs.sql | 2 +- koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 6 +++--- .../intranet-tmpl/prog/en/includes/intranet-bottom.inc | 8 ++++---- .../prog/en/modules/admin/preferences/patrons.pref | 8 ++++---- koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc | 4 ++-- koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 4 ++-- t/db_dependent/Koha/Template/Plugin/JSConsents.t | 2 +- 8 files changed, 19 insertions(+), 19 deletions(-) --- a/Koha/Template/Plugin/JSConsents.pm +++ a/Koha/Template/Plugin/JSConsents.pm @@ -26,7 +26,7 @@ use C4::Context; sub all { my ( $self ) = @_; - my $consents = C4::Context->preference( 'ConsentJS' ); + my $consents = C4::Context->preference( 'CookieConsentedJS' ); if (length $consents > 0) { my $decoded = decode_base64($consents); return decode_json $decoded; @@ -40,7 +40,7 @@ sub all { =head1 NAME Koha::Template::Plugin::JSConsents - TT Plugin for Javascript consents -Provided by ConsentJS syspref +Provided by CookieConsentedJS syspref =head1 SYNOPSIS --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -156,7 +156,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ComponentSortField','title','call_number|pubdate|acqdate|title|author','Specify the default field used for sorting','Choice'), ('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice'), ('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'), +('CookieConsentedJS', '', NULL, 'Add Javascript code that will run if cookie consent is provided (e.g. tracking code).', 'Free'), ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), ('ContentWarningField', '', NULL, 'MARC field to use for content warnings', 'Free'), ('CookieConsent', '0', NULL, 'Require cookie consent to be displayed', 'YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -4306,14 +4306,14 @@ div .suggestion_note { } } -#consentJSItems { - #consentJSWarning { +#cookieConsentedJSItems { + #cookieConsentedJSWarning { margin: 20px 0; text-align: center; font-weight: 800; font-size: 120%; } - .consentJSItem { + .cookieConsentedJSItem { margin-bottom: 30px; padding: 10px; border: 1px solid #ccc; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -85,7 +85,7 @@ [% Koha.Preference( 'CookieConsentBar' ) | $raw %]
- [% IF ( Koha.Preference( 'ConsentJS' ).length > 0 ) %] + [% IF ( Koha.Preference( 'CookieConsentedJS' ).length > 0 ) %] [% END %] @@ -122,7 +122,7 @@ [% END %] - - [% IF Koha.Preference( 'CookieConsent' ) && Koha.Preference( 'ConsentJS' ).length > 0 %] + + [% IF Koha.Preference( 'CookieConsent' ) && Koha.Preference( 'CookieConsentedJS' ).length > 0 %] [% consents = JSConsents.all() %] [% FOREACH consent IN consents %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -395,11 +395,11 @@ Patrons: no: "Don't require" - cookie consent to be displayed - - - Specify Javascript that requires user consent to run (e.g. tracking code) - - pref: ConsentJS + - Add Javascript code that will run if cookie consent is provided (e.g. tracking code). + - pref: CookieConsentedJS type: modaljs - initiator: populateConsentJS - processor: prepareConsentJS + initiator: populateCookieConsentedJS + processor: prepareCookieConsentedJS - - Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen - pref: CookieConsentBar --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc +++ a/koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc @@ -451,7 +451,7 @@ [% Koha.Preference( 'CookieConsentBar' ) | $raw %]
- [% IF ( Koha.Preference( 'ConsentJS' ).length > 0 ) %] + [% IF ( Koha.Preference( 'CookieConsentedJS' ).length > 0 ) %] [% END %] @@ -488,7 +488,7 @@