Skip to content

Commit 6020e8a

Browse files
author
Serhii Balko
committed
MC-41474: Cookie message displaying at header when new page loads
1 parent 7c6b636 commit 6020e8a

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

app/code/Magento/Theme/view/frontend/templates/js/cookie_status.phtml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
6+
/**
7+
* @var Magento\Framework\View\Element\Template $this
8+
*/
89
?>
910

1011
<div id="cookie-status">
11-
<?= $block->escapeHtml(__('The store will not work correctly in the case when cookies are disabled.')); ?>
12+
<?= $this->escapeHtml(__('The store will not work correctly in the case when cookies are disabled.')); ?>
1213
</div>
13-
<?php
14-
$script = 'document.querySelector("#cookie-status").style.display = "none";';
15-
?>
16-
<?= /* @noEscape */ $secureRenderer->renderTag('script', ['type' => 'text/javascript'], $script, false); ?>
17-
1814
<script type="text/x-magento-init">
1915
{
2016
"*": {

app/design/frontend/Magento/blank/Magento_Theme/web/css/source/_module.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@
285285
padding: 0;
286286
}
287287
}
288+
289+
#cookie-status {
290+
display: none;
291+
}
288292
}
289293

290294
//

app/design/frontend/Magento/luma/Magento_Theme/web/css/source/_module.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@
393393
border: @tooltip__border-width solid @tooltip__border-color;
394394
padding: 10px;
395395
}
396+
397+
#cookie-status {
398+
display: none;
399+
}
396400
}
397401

398402
//

0 commit comments

Comments
 (0)