From 414db44d332f4f4626c80d915c5f04666b63e7a8 Mon Sep 17 00:00:00 2001 From: Kevin Date: Tue, 22 Dec 2020 08:57:30 +0100 Subject: [PATCH] V1.3.3 --- CHANGELOG.md | 7 ++- composer.json | 2 +- .../cookieboss/dist/img/CookieBoss-icon.svg | 44 +++++++++---------- src/controllers/SettingsController.php | 7 ++- src/templates/askConsent/_index.twig | 2 +- 5 files changed, 36 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f0ea93c..6a6a692 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,4 +86,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## 1.3.2 - 2020-09-10 ### Fixed -- Migration error [#15](https://github.com/dutchheight/craft-cookie-boss/issues/15) \ No newline at end of file +- Migration error [#15](https://github.com/dutchheight/craft-cookie-boss/issues/15) + +## 1.3.3 - 2020-12-22 +### Fixed +- Vue version [#18](https://github.com/dutchheight/craft-cookie-boss/issues/18) +- Invalid after days bug [#16](https://github.com/dutchheight/craft-cookie-boss/issues/16) \ No newline at end of file diff --git a/composer.json b/composer.json index a710b69..c606f77 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "dutchheight/craft-cookie-boss", "description": "Allow your visitors to set their cookie preference.", "type": "craft-plugin", - "version": "1.3.2.2", + "version": "1.3.3", "keywords": [ "craft", "cms", diff --git a/src/assetbundles/cookieboss/dist/img/CookieBoss-icon.svg b/src/assetbundles/cookieboss/dist/img/CookieBoss-icon.svg index 6558c82..cf8066b 100644 --- a/src/assetbundles/cookieboss/dist/img/CookieBoss-icon.svg +++ b/src/assetbundles/cookieboss/dist/img/CookieBoss-icon.svg @@ -1,22 +1,22 @@ - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/src/controllers/SettingsController.php b/src/controllers/SettingsController.php index 5a3d6b6..b87096a 100644 --- a/src/controllers/SettingsController.php +++ b/src/controllers/SettingsController.php @@ -122,11 +122,16 @@ private function _saveSettings($forceReconsent = false) return null; } + + $settings['enabled'] = (Craft::$app->getRequest()->getRequiredBodyParam('enabled') == '1'); $settings['presentGroups'] = (Craft::$app->getRequest()->getRequiredBodyParam('presentGroups') == '1'); $settings['forceAccept'] = (Craft::$app->getRequest()->getRequiredBodyParam('forceAccept') == '1'); - $settings['cookieTime'] = (Craft::$app->getRequest()->getRequiredBodyParam('cookieTime') || 1) * 86400; + $cookieTime = (Craft::$app->getRequest()->getRequiredBodyParam('cookieTime') != null) ? + Craft::$app->getRequest()->getRequiredBodyParam('cookieTime') : 1; + $settings['cookieTime'] = $cookieTime * 86400; + $settings['title'] = Craft::$app->getRequest()->getRequiredBodyParam('title'); $settings['message'] = Craft::$app->getRequest()->getRequiredBodyParam('message'); $settings['messageSettings'] = Craft::$app->getRequest()->getRequiredBodyParam('messageSettings'); diff --git a/src/templates/askConsent/_index.twig b/src/templates/askConsent/_index.twig index a5de652..7479779 100644 --- a/src/templates/askConsent/_index.twig +++ b/src/templates/askConsent/_index.twig @@ -1,5 +1,5 @@ {% if settings.enabled %} - + {% do view.registerAssetBundle("dutchheight\\cookieboss\\assetbundles\\cookieboss\\CookieBossAsset") %}