|
5 | 5 | */ |
6 | 6 |
|
7 | 7 | /** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */ |
| 8 | +$blockId = $block->getId(); |
8 | 9 | ?> |
9 | | -<div id="product_composite_configure" class="product-configure-popup"> |
| 10 | +<div id="product_composite_configure" |
| 11 | + class="product-configure-popup product-configure-popup-<?= $block->escapeHtmlAttr($blockId) ?>"> |
10 | 12 | <iframe name="product_composite_configure_iframe" id="product_composite_configure_iframe"></iframe> |
11 | 13 | <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag( |
12 | 14 | 'onload', |
|
31 | 33 | </form> |
32 | 34 | <?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag( |
33 | 35 | 'onsubmit', |
34 | | - "productConfigure.onConfirmBtn();event.preventDefault()", |
| 36 | + 'productConfigure.onConfirmBtn();event.preventDefault()', |
35 | 37 | '.product_composite_configure_form:last-of-type' |
36 | 38 | ) ?> |
37 | 39 |
|
38 | 40 | <div id="product_composite_configure_confirmed" class="product_composite_configure_confirmed"></div> |
39 | 41 |
|
40 | 42 | <?php $scriptString = <<<script |
41 | | - prodCompConfIframe = document.querySelector("iframe[name='product_composite_configure_iframe']:last-of-type"); |
| 43 | + prodCompConfIframe = document.querySelector( |
| 44 | + ".product-configure-popup-$blockId iframe[name='product_composite_configure_iframe']" |
| 45 | + ); |
42 | 46 | prodCompConfIframe.style.width = 0; |
43 | 47 | prodCompConfIframe.style.height = 0; |
44 | 48 | prodCompConfIframe.style.border = "0px solid #fff"; |
45 | 49 | prodCompConfIframe.style.position = "absolute"; |
46 | 50 | prodCompConfIframe.style.top = "-1000px"; |
47 | 51 | prodCompConfIframe.style.left = "-1000px"; |
48 | | - prodCompConfMessages = document.querySelectorAll(".product_composite_configure_messages"); |
49 | | - for (var i = 0; i < prodCompConfMessages.length; i++) { |
50 | | - prodCompConfMessages[i].style.display = "none"; |
51 | | - } |
52 | | - prodCompConfFormAdd = document.querySelectorAll(".product_composite_configure_form_additional"); |
53 | | - for (var i = 0; i < prodCompConfFormAdd.length; i++) { |
54 | | - prodCompConfFormAdd[i].style.display = "none"; |
55 | | - } |
56 | | - prodCompConfFormConf = document.querySelectorAll(".product_composite_configure_form_confirmed"); |
57 | | - for (var i = 0; i < prodCompConfFormConf.length; i++) { |
58 | | - prodCompConfFormConf[i].style.display = "none"; |
59 | | - } |
60 | | - prodCompConfConf = document.querySelectorAll(".product_composite_configure_confirmed"); |
61 | | - for (var i = 0; i < prodCompConfConf.length; i++) { |
62 | | - prodCompConfConf[i].style.display = "none"; |
63 | | - } |
64 | | - prodConfPopup = document.querySelectorAll(".product-configure-popup"); |
65 | | - for (var i = 0; i < prodConfPopup.length; i++) { |
66 | | - prodConfPopup[i].style.display = "none"; |
67 | | - } |
| 52 | +
|
| 53 | + prodCompConfMessages = document.querySelector( |
| 54 | + ".product-configure-popup-$blockId .product_composite_configure_messages" |
| 55 | + ); |
| 56 | + prodCompConfMessages.style.display = "none"; |
| 57 | +
|
| 58 | + prodCompConfFormAdd = document.querySelector( |
| 59 | + ".product-configure-popup-$blockId .product_composite_configure_form_additional" |
| 60 | + ); |
| 61 | + prodCompConfFormAdd.style.display = "none"; |
| 62 | +
|
| 63 | + prodCompConfFormConf = document.querySelector( |
| 64 | + ".product-configure-popup-$blockId .product_composite_configure_form_confirmed" |
| 65 | + ); |
| 66 | + prodCompConfFormConf.style.display = "none"; |
| 67 | +
|
| 68 | + prodCompConfConf = document.querySelector( |
| 69 | + ".product-configure-popup-$blockId .product_composite_configure_confirmed" |
| 70 | + ); |
| 71 | + prodCompConfConf.style.display = "none"; |
| 72 | +
|
| 73 | + prodConfPopup = document.querySelector(".product-configure-popup-$blockId"); |
| 74 | + prodConfPopup.style.display = "none"; |
68 | 75 |
|
69 | 76 | require([ |
70 | 77 | "jquery", |
|
0 commit comments