|
10 | 10 |
|
11 | 11 | use FriendsOfRedaxo\ConsentManager\Frontend; |
12 | 12 |
|
13 | | -$addon = rex_addon::get('consent_manager'); |
14 | 13 | $consent_manager = new Frontend(0); |
15 | 14 | if (is_string(rex_request::server('HTTP_HOST'))) { |
16 | 15 | $consent_manager->setDomain(rex_request::server('HTTP_HOST')); |
17 | 16 | } |
18 | 17 | if (0 === count($consent_manager->texts)) { |
19 | | - echo '<div id="consent_manager-background">' . rex_view::error($addon->i18n('consent_manager_error_noconfig')) . '</div>'; |
| 18 | + echo '<div id="consent_manager-background">' . rex_view::error(rex_addon::get('consent_manager')->i18n('consent_manager_error_noconfig')) . '</div>'; |
20 | 19 | return; |
21 | 20 | } |
22 | 21 |
|
23 | 22 | // Check for CSS Framework Mode |
24 | | -$cssFrameworkMode = $addon->getConfig('css_framework_mode'); |
| 23 | +$cssFrameworkMode = rex_addon::get('consent_manager')->getConfig('css_framework_mode'); |
25 | 24 | if ($cssFrameworkMode) { |
26 | 25 | echo $this->parse('ConsentManager/box_' . $cssFrameworkMode . '.php'); |
27 | 26 | return; |
28 | 27 | } |
29 | 28 |
|
30 | 29 | if (0 < count($consent_manager->cookiegroups)) : ?> |
31 | 30 | <div tabindex="-1" class="consent_manager-background consent_manager-hidden <?= $consent_manager->boxClass ?>" id="consent_manager-background" data-domain-name="<?= $consent_manager->domainName ?>" data-version="<?= $consent_manager->version ?>" data-consentid="<?= uniqid('', true) ?>" data-cachelogid="<?= $consent_manager->cacheLogId ?>" data-nosnippet aria-hidden="true"> |
32 | | - <?php |
33 | | - // Inline-CSS nur ausgeben wenn kein Framework-Modus und kein eigenes CSS aktiv ist |
34 | | - if ('' === $cssFrameworkMode && false === $addon->getConfig('outputowncss', false)) : |
35 | | - ?> |
36 | 31 | <style nonce="<?= rex_response::getNonce() ?>"> |
37 | 32 | #consent_manager-background { |
38 | | - <?php if ($addon->getConfig('backdrop', '1') === '0'): ?> |
| 33 | + <?php if (rex_addon::get('consent_manager')->getConfig('backdrop', '1') === '0'): ?> |
39 | 34 | background: transparent !important; |
40 | 35 | pointer-events: none !important; |
41 | 36 | <?php endif; ?> |
|
44 | 39 | max-height: 90vh !important; |
45 | 40 | overflow-y: auto !important; |
46 | 41 | border-radius: 0 !important; |
47 | | - <?php if ($addon->getConfig('backdrop', '1') === '0'): ?> |
| 42 | + <?php if (rex_addon::get('consent_manager')->getConfig('backdrop', '1') === '0'): ?> |
48 | 43 | pointer-events: auto !important; |
49 | 44 | box-shadow: 0 0 20px rgba(0,0,0,0.2) !important; |
50 | 45 | background: #fff !important; |
|
74 | 69 | opacity: 1; |
75 | 70 | } |
76 | 71 | </style> |
77 | | - <?php endif; ?> |
78 | 72 | <div class="consent_manager-wrapper" id="consent_manager-wrapper" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="consent_manager-headline"> |
79 | 73 | <div class="consent_manager-header"> |
80 | | - <p class="consent_manager-headline" id="consent_manager-headline"<?php if ('' === $cssFrameworkMode && false === $addon->getConfig('outputowncss', false)) : ?> style="margin:0; font-weight:bold; color: inherit;"<?php endif; ?>><?= $consent_manager->texts['headline'] ?></p> |
| 74 | + <p class="consent_manager-headline" id="consent_manager-headline" style="margin:0; font-weight:bold; color: inherit;"><?= $consent_manager->texts['headline'] ?></p> |
81 | 75 | <button class="consent_manager-close" aria-label="Close" type="button">×</button> |
82 | 76 | </div> |
83 | 77 | <div class="consent_manager-wrapper-inner"> |
|
0 commit comments