Skip to content

Commit 090c4a7

Browse files
committed
Merge remote-tracking branch 'l3/MC-39776' into BUGFIX-11-23
2 parents ac9b271 + 69c26af commit 090c4a7

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

app/code/Magento/LoginAsCustomerAssistance/view/frontend/templates/shopping-assistance.phtml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,18 @@ use Magento\LoginAsCustomerAssistance\ViewModel\ShoppingAssistanceViewModel;
1111
/** @var Escaper $escaper */
1212
/** @var ShoppingAssistanceViewModel $viewModel */
1313
$viewModel = $block->getViewModel();
14-
?>
1514

16-
<script type="text/x-magento-init">
17-
{
18-
".form-create-account, .form-edit-account": {
19-
"Magento_LoginAsCustomerAssistance/js/opt-in": {
20-
"allowAccess": "<?= /* @noEscape */ IsAssistanceEnabledInterface::ALLOWED ?>",
21-
"denyAccess": "<?= /* @noEscape */ IsAssistanceEnabledInterface::DENIED ?>"
15+
if ($viewModel->isLoginAsCustomerEnabled()): ?>
16+
<script type="text/x-magento-init">
17+
{
18+
".form-create-account, .form-edit-account": {
19+
"Magento_LoginAsCustomerAssistance/js/opt-in": {
20+
"allowAccess": "<?= /* @noEscape */ IsAssistanceEnabledInterface::ALLOWED ?>",
21+
"denyAccess": "<?= /* @noEscape */ IsAssistanceEnabledInterface::DENIED ?>"
22+
}
2223
}
2324
}
24-
}
25-
</script>
26-
27-
<?php if ($viewModel->isLoginAsCustomerEnabled()): ?>
25+
</script>
2826
<div class="field choice">
2927
<input type="checkbox"
3028
name="assistance_allowed_checkbox"

0 commit comments

Comments
 (0)