File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
app/code/Magento/LoginAsCustomerAssistance/view/frontend/templates Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff 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"
You can’t perform that action at this time.
0 commit comments