|
3 | 3 | * Copyright © Magento, Inc. All rights reserved.
|
4 | 4 | * See COPYING.txt for license details.
|
5 | 5 | */
|
6 |
| - |
7 |
| -// @codingStandardsIgnoreFile |
8 |
| - |
| 6 | +// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis |
9 | 7 | ?>
|
10 | 8 | <?php /* @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Composite\Fieldset\Options\Type\Checkbox */ ?>
|
11 | 9 | <?php $_option = $block->getOption(); ?>
|
12 | 10 | <?php $_selections = $_option->getSelections(); ?>
|
13 |
| -<?php $_skipSaleableCheck = $this->helper('Magento\Catalog\Helper\Product')->getSkipSaleableCheck(); ?> |
| 11 | +<?php $_skipSaleableCheck = $this->helper(Magento\Catalog\Helper\Product::class)->getSkipSaleableCheck(); ?> |
14 | 12 |
|
15 |
| -<div class="field admin__field options<?php if ($_option->getRequired()) echo ' required _required' ?>"> |
| 13 | +<div class="field admin__field options<?php if ($_option->getRequired()) { echo ' required _required'; } ?>"> |
16 | 14 | <label class="label admin__field-label">
|
17 | 15 | <span><?= $block->escapeHtml($_option->getTitle()) ?></span>
|
18 | 16 | </label>
|
19 | 17 |
|
20 | 18 | <div class="control admin__field-control">
|
21 |
| - <div class="nested <?php if ($_option->getDecoratedIsLast()):?> last<?php endif;?>"> |
| 19 | + <div class="nested <?php if ($_option->getDecoratedIsLast()) :?> last<?php endif;?>"> |
22 | 20 |
|
23 |
| - <?php if (count($_selections) == 1 && $_option->getRequired()): ?> |
24 |
| - <?= /* @escapeNotVerified */ $block->getSelectionQtyTitlePrice($_selections[0]) ?> |
| 21 | + <?php if (count($_selections) == 1 && $_option->getRequired()) : ?> |
| 22 | + <?= /* @noEscape */ $block->getSelectionQtyTitlePrice($_selections[0]) ?> |
25 | 23 | <input type="hidden"
|
26 |
| - name="bundle_option[<?= /* @escapeNotVerified */ $_option->getId() ?>]" |
27 |
| - value="<?= /* @escapeNotVerified */ $_selections[0]->getSelectionId() ?>" |
28 |
| - price="<?= /* @escapeNotVerified */ $block->getSelectionPrice($_selections[0]) ?>" /> |
29 |
| - <?php else:?> |
| 24 | + name="bundle_option[<?= $block->escapeHtmlAttr($_option->getId()) ?>]" |
| 25 | + value="<?= $block->escapeHtmlAttr($_selections[0]->getSelectionId()) ?>" |
| 26 | + price="<?= $block->escapeHtmlAttr($block->getSelectionPrice($_selections[0])) ?>" /> |
| 27 | + <?php else :?> |
30 | 28 |
|
31 |
| - <?php foreach ($_selections as $_selection): ?> |
| 29 | + <?php foreach ($_selections as $_selection) : ?> |
32 | 30 | <div class="field choice admin__field admin__field-option">
|
33 | 31 | <input
|
34 |
| - class="change-container-classname admin__control-checkbox checkbox bundle-option-<?= /* @escapeNotVerified */ $_option->getId() ?> <?php if ($_option->getRequired()) echo 'validate-one-required-by-name' ?>" |
35 |
| - id="bundle-option-<?= /* @escapeNotVerified */ $_option->getId() ?>-<?= /* @escapeNotVerified */ $_selection->getSelectionId() ?>" |
| 32 | + class="change-container-classname admin__control-checkbox checkbox bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?> <?php if ($_option->getRequired()) { echo 'validate-one-required-by-name'; } ?>" |
| 33 | + id="bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?>-<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>" |
36 | 34 | type="checkbox"
|
37 |
| - name="bundle_option[<?= /* @escapeNotVerified */ $_option->getId() ?>][<?= /* @escapeNotVerified */ $_selection->getId() ?>]" |
38 |
| - <?php if ($block->isSelected($_selection)):?> |
| 35 | + name="bundle_option[<?= $block->escapeHtmlAttr($_option->getId()) ?>][<?= $block->escapeHtmlAttr($_selection->getId()) ?>]" |
| 36 | + <?php if ($block->isSelected($_selection)) :?> |
39 | 37 | <?= ' checked="checked"' ?>
|
40 | 38 | <?php endif;?>
|
41 |
| - <?php if (!$_selection->isSaleable() && !$_skipSaleableCheck):?> |
| 39 | + <?php if (!$_selection->isSaleable() && !$_skipSaleableCheck) :?> |
42 | 40 | <?= ' disabled="disabled"' ?>
|
43 | 41 | <?php endif;?>
|
44 |
| - value="<?= /* @escapeNotVerified */ $_selection->getSelectionId() ?>" |
| 42 | + value="<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>" |
45 | 43 | onclick="ProductConfigure.bundleControl.changeSelection(this)"
|
46 |
| - price="<?= /* @escapeNotVerified */ $block->getSelectionPrice($_selection) ?>" /> |
| 44 | + price="<?= $block->escapeHtmlAttr($block->getSelectionPrice($_selection)) ?>" /> |
47 | 45 |
|
48 | 46 | <label class="admin__field-label"
|
49 |
| - for="bundle-option-<?= /* @escapeNotVerified */ $_option->getId() ?>-<?= /* @escapeNotVerified */ $_selection->getSelectionId() ?>"> |
50 |
| - <span><?= /* @escapeNotVerified */ $block->getSelectionQtyTitlePrice($_selection) ?></span> |
| 47 | + for="bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?>-<?= $block->escapeHtmlAttr($_selection->getSelectionId()) ?>"> |
| 48 | + <span><?= /* @noEscape */ $block->getSelectionQtyTitlePrice($_selection) ?></span> |
51 | 49 | </label>
|
52 | 50 |
|
53 |
| - <?php if ($_option->getRequired()): ?> |
54 |
| - <?= /* @escapeNotVerified */ $block->setValidationContainer('bundle-option-' . $_option->getId() . '-' . $_selection->getSelectionId(), 'bundle-option-' . $_option->getId() . '-container') ?> |
| 51 | + <?php if ($_option->getRequired()) : ?> |
| 52 | + <?= /* @noEscape */ $block->setValidationContainer('bundle-option-' . $_option->getId() . '-' . $_selection->getSelectionId(), 'bundle-option-' . $_option->getId() . '-container') ?> |
55 | 53 | <?php endif;?>
|
56 | 54 | </div>
|
57 | 55 | <?php endforeach; ?>
|
58 | 56 |
|
59 |
| - <div id="bundle-option-<?= /* @escapeNotVerified */ $_option->getId() ?>-container"></div> |
| 57 | + <div id="bundle-option-<?= $block->escapeHtmlAttr($_option->getId()) ?>-container"></div> |
60 | 58 | <?php endif; ?>
|
61 | 59 | </div>
|
62 | 60 | </div>
|
|
0 commit comments