Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/consent_inline.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
--consent-overlay-border-radius: 8px;
--consent-overlay-border: 1px solid rgba(128, 128, 128, 0.2);
--consent-overlay-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
--consent-overlay-max-width: 90%;
--consent-overlay-max-width: 100%;

position: relative;
z-index: 2;
Expand Down Expand Up @@ -258,7 +258,7 @@
/* Mobile Variablen */
--consent-min-height: 250px;
--consent-overlay-padding: 1.5rem;
--consent-overlay-max-width: 95%;
--consent-overlay-max-width: 100%;
}

.consent-inline-content {
Expand Down
10 changes: 8 additions & 2 deletions assets/consent_inline.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,15 @@ if (typeof window.consentManagerInline !== 'undefined') {
this.clearOldConsentCookies();
}

// Legacy-Cleanup: in v5.6.6 und früher wurde das Cookie unter dem
// falschen Namen 'consent_manager' geschrieben, alle Read-Pfade
// verwendeten aber 'consentmanager'. Den alten Namen für betroffene
// User explizit löschen, damit nicht zwei parallele Cookies existieren.
document.cookie = 'consent_manager=; expires=' + new Date(0).toUTCString() + '; path=/';

// Setze das neue Cookie (neu und sauber)
document.cookie = 'consent_manager=' + JSON.stringify(data) +
'; expires=' + expires.toUTCString() +
document.cookie = 'consentmanager=' + JSON.stringify(data) +
'; expires=' + expires.toUTCString() +
'; path=/; SameSite=Lax';
},
Comment thread
marcohanke marked this conversation as resolved.

Expand Down
9 changes: 8 additions & 1 deletion fragments/ConsentManager/inline_placeholder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
$options = $this->getVar('options', []);
$placeholderData = $this->getVar('placeholderData', []);
$content = $this->getVar('content', '');
$consentId = $this->getVar('consentId', uniqid('consent_', true));
$serviceKey = $this->getVar('serviceKey', '');
Comment thread
marcohanke marked this conversation as resolved.
Outdated

// Optionale CSS-Klasse (laut docs/inline.md unterstützt) an den Container hängen
$extraClass = (isset($options['css_class']) && is_string($options['css_class']) && '' !== $options['css_class'])
? ' ' . rex_escape($options['css_class'])
: '';

// Text-Variablen aus Fragment abrufen (von FriendsOfRedaxo\ConsentManager\InlineConsent::getButtonText())
$inline_title_fallback = $this->getVar('inline_title_fallback', 'Externes Medium');
Expand Down Expand Up @@ -55,7 +62,7 @@ class="consent-inline-thumbnail"
}
?>

<div class="consent-inline-container" data-consent-id="<?= rex_escape($consentId) ?>"
<div class="consent-inline-container<?= $extraClass ?>" data-consent-id="<?= rex_escape($consentId) ?>"
data-service="<?= rex_escape($serviceKey) ?>">

<div class="consent-inline-placeholder">
Expand Down
Loading