Skip to content

Commit

Permalink
v1.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin committed Sep 29, 2021
1 parent 1f66e84 commit 27c8121
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 20 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Different button text (popup and popup settings) [#17](https://github.com/dutchheight/craft-cookie-boss/issues/17)

### Edit
- Dependencies
- Dependencies

## 1.4.3 - 2021-09-29
### Added
- Reflect 'allowAdminChanges' in UI
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dutchheight/craft-cookie-boss",
"description": "Allow your visitors to set their cookie preference.",
"type": "craft-plugin",
"version": "1.4.2",
"version": "1.4.3",
"keywords": [
"craft",
"cms",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/controllers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public function actionPluginSettings($settings = null): Response
$variables['consentGroups'] = CookieBoss::getInstance()->consentGroups->getAll();
$variables['consentGroupsSelectOptions'] = CookieBoss::getInstance()->consentGroups->getAllAsSelectOptions();
$variables['cookies'] = CookieBoss::getInstance()->cookieDescriptions->getAll();


$variables['allowAdminChanges'] = Craft::$app->getConfig()->getGeneral()->allowAdminChanges;
$variables['settings'] = $settings;
$variables['tabs'] = [
'general' => [
Expand Down
34 changes: 18 additions & 16 deletions src/templates/settings.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,25 @@
{% set title = 'Cookie Boss Settings'|t('cookie-boss') %}

{% block actionButton %}
<div id="save-btn-container" class="btngroup submit">
{{ tag('input', {
type: 'submit',
class: ['btn', 'submit'],
value: 'Save'|t('app'),
}) }}
<div class="btn submit menubtn"></div>
<div class="menu" data-align="right">
<ul>
<li>
<a class="formsubmit" data-name="submit-reset" data-param="reset-consent" data-value="true" data-action="cookie-boss/settings/save-general">
{{ 'Save and invalidate consent'|t('cookie-boss') }}
</a>
</li>
</ul>
{% if allowAdminChanges %}
<div id="save-btn-container" class="btngroup submit">
{{ tag('input', {
type: 'submit',
class: ['btn', 'submit'],
value: 'Save'|t('app'),
}) }}
<div class="btn submit menubtn"></div>
<div class="menu" data-align="right">
<ul>
<li>
<a class="formsubmit" data-name="submit-reset" data-param="reset-consent" data-value="true" data-action="cookie-boss/settings/save-general">
{{ 'Save and invalidate consent'|t('cookie-boss') }}
</a>
</li>
</ul>
</div>
</div>
</div>
{% endif %}
{% endblock %}

{% block content %}
Expand Down

0 comments on commit 27c8121

Please sign in to comment.