Skip to content

Commit c184498

Browse files
committed
Merge branch 'master' into magento2.1.x
2 parents be3197d + 65e8101 commit c184498

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

Block/Messages/PrivacyMessagePopup.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,10 @@ private function getCookieDisclosureInformation(): string
9494
if (!$this->hasData('cookie_disclosure_information')) {
9595
$block = $this->getLayout()->createBlock(
9696
Block::class,
97+
'opengento.gdpr.cookie.disclosure.information',
9798
['data' => ['block_id' => $this->config->getCookieDisclosureInformationBlockId()]]
9899
);
99-
$this->setData('cookie_disclosure_information', $block);
100+
$this->setData('cookie_disclosure_information', $block->toHtml());
100101
}
101102

102103
return (string) $this->_getData('cookie_disclosure_information');

view/frontend/web/js/view/popup.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -23,33 +23,26 @@ define([
2323
return Component.extend({
2424
showPopUp: ko.observable(null),
2525
popupText: ko.observable(null),
26+
popupLink: ko.observable(null),
2627

2728
defaults: {
2829
template: 'Opengento_Gdpr/message'
2930
},
3031

3132
/**
32-
* Initialize component.
33+
* Initialize component
3334
*/
3435
initialize: function () {
3536
this._super();
3637

3738
this.showPopUp(!$.cookie(this.cookieName));
3839
this.popupText(this.notificationText);
40+
this.popupLink(this.learnMore);
3941

4042
$(document).on('click', '#enhanced-privacy-popup-agree', function () {
4143
this.showPopUp(false);
4244
$.cookie(this.cookieName, 1);
4345
}.bind(this));
44-
},
45-
46-
/**
47-
* Get URL to information page.
48-
*
49-
* @returns {*}
50-
*/
51-
getLearnMoreLink: function () {
52-
return this.learnMore;
5346
}
5447
});
5548
});

view/frontend/web/template/message.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
<div class="popup content">
1919
<strong data-bind="i18n: 'Cookie Disclosure'"></strong>
2020
<div class="block-content">
21-
<p data-bind="text: notificationText"></p>
21+
<div data-bind="html: notificationText"></div>
2222
<div class="actions-toolbar">
2323
<div class="secondary">
24-
<a class="action" data-bind="attr: {href: getLearnMoreLink() }, i18n: 'Read More'"></a>
24+
<a class="action" data-bind="attr: {href: learnMore}, i18n: 'Read More'"></a>
2525
</div>
2626
<div class="primary">
2727
<button type="button" class="action primary" id="enhanced-privacy-popup-agree" data-bind="i18n: 'Accept'"></button>

0 commit comments

Comments
 (0)