7
7
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
8
8
// phpcs:disable Generic.Files.LineLength.TooLong
9
9
/** @var $block \Magento\Swatches\Block\Adminhtml\Attribute\Edit\Options\Visual */
10
+ /** @var $escaper \Magento\Framework\Escaper */
10
11
11
12
$ stores = $ block ->getStoresSortedBySortOrder ();
12
13
?>
13
14
<fieldset class="admin__fieldset fieldset">
14
15
<legend class="legend">
15
- <span><?= $ block ->escapeHtml (__ ('Manage Swatch (Values of Your Attribute) ' )) ?> </span>
16
+ <span><?= $ escaper ->escapeHtml (__ ('Manage Swatch (Values of Your Attribute) ' )) ?> </span>
16
17
</legend><br />
17
18
<div class="admin__control-table-wrapper" id="swatch-visual-options-panel">
18
19
<table class="data-table clearfix" cellspacing="0">
19
20
<thead>
20
21
<tr id="swatch-visual-options-table">
21
22
<th class="col-draggable"></th>
22
- <th class="col-default"><span><?= $ block ->escapeHtml (__ ('Is Default ' )) ?> </span></th>
23
- <th><span><?= $ block ->escapeHtml (__ ('Swatch ' )) ?> </span></th>
23
+ <th class="col-default"><span><?= $ escaper ->escapeHtml (__ ('Is Default ' )) ?> </span></th>
24
+ <th><span><?= $ escaper ->escapeHtml (__ ('Swatch ' )) ?> </span></th>
24
25
<?php foreach ($ stores as $ _store ): ?>
25
26
<th<?= ($ _store ->getId () == \Magento \Store \Model \Store::DEFAULT_STORE_ID ) ? ' class="_required" ' : '' ?> >
26
- <span><?= $ block ->escapeHtml ($ _store ->getName ()) ?> </span>
27
+ <span><?= $ escaper ->escapeHtml ($ _store ->getName ()) ?> </span>
27
28
</th>
28
29
<?php endforeach ; ?>
29
30
<?php $ colTotal = count ($ stores ) * 2 + 3 ; ?>
@@ -42,9 +43,9 @@ $stores = $block->getStoresSortedBySortOrder();
42
43
<th colspan="<?= (int )$ colTotal ?> " class="col-actions-add">
43
44
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()): ?>
44
45
<button id="add_new_swatch_visual_option_button"
45
- title="<?= $ block ->escapeHtml (__ ('Add Swatch ' )) ?> "
46
+ title="<?= $ escaper ->escapeHtml (__ ('Add Swatch ' )) ?> "
46
47
type="button" class="action- scalable add">
47
- <span><?= $ block ->escapeHtml (__ ('Add Swatch ' )) ?> </span>
48
+ <span><?= $ escaper ->escapeHtml (__ ('Add Swatch ' )) ?> </span>
48
49
</button>
49
50
<?php endif ; ?>
50
51
</th>
@@ -58,7 +59,7 @@ $stores = $block->getStoresSortedBySortOrder();
58
59
<td class="col-draggable">
59
60
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()): ?>
60
61
<div data-role="draggable-handle" class="draggable-handle"
61
- title="<?= $ block ->escapeHtml (__ ('Sort Option ' )) ?> "></div>
62
+ title="<?= $ escaper ->escapeHtml (__ ('Sort Option ' )) ?> "></div>
62
63
<?php endif ; ?>
63
64
<input data-role="order" type="hidden" name="optionvisual[order][<%- data.id %>]" value="<%- data.sort_order %>" <?= ($ block ->getReadOnly () || $ block ->canManageOptionDefaultOnly ()) ? ' disabled="disabled" ' : '' ?> />
64
65
</td>
@@ -72,17 +73,17 @@ $stores = $block->getStoresSortedBySortOrder();
72
73
<div class="swatch_sub-menu_container" id="swatch_container_option_<%- data.id %>">
73
74
<div class="swatch_row position-relative">
74
75
<div class="swatch_row_name colorpicker_handler">
75
- <p><?= $ block ->escapeHtml (__ ('Choose a color ' )) ?> </p>
76
+ <p><?= $ escaper ->escapeHtml (__ ('Choose a color ' )) ?> </p>
76
77
</div>
77
78
</div>
78
79
<div class="swatch_row">
79
80
<div class="swatch_row_name btn_choose_file_upload" id="swatch_choose_file_option_<%- data.id %>">
80
- <p><?= $ block ->escapeHtml (__ ('Upload a file ' )) ?> </p>
81
+ <p><?= $ escaper ->escapeHtml (__ ('Upload a file ' )) ?> </p>
81
82
</div>
82
83
</div>
83
84
<div class="swatch_row">
84
85
<div class="swatch_row_name btn_remove_swatch">
85
- <p><?= $ block ->escapeHtml (__ ('Clear ' )) ?> </p>
86
+ <p><?= $ escaper ->escapeHtml (__ ('Clear ' )) ?> </p>
86
87
</div>
87
88
</div>
88
89
</div>
@@ -98,9 +99,9 @@ $stores = $block->getStoresSortedBySortOrder();
98
99
<td id="delete_button_swatch_container_<%- data.id %>" class="col-delete">
99
100
<input type="hidden" class="delete-flag" name="optionvisual[delete][<%- data.id %>]" value="" />
100
101
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()): ?>
101
- <button title="<?= $ block ->escapeHtml (__ ('Delete ' )) ?> " type="button"
102
+ <button title="<?= $ escaper ->escapeHtml (__ ('Delete ' )) ?> " type="button"
102
103
class="action- scalable delete delete-option">
103
- <span><?= $ block ->escapeHtml (__ ('Delete ' )) ?> </span>
104
+ <span><?= $ escaper ->escapeHtml (__ ('Delete ' )) ?> </span>
104
105
</button>
105
106
<?php endif ;?>
106
107
</td>
@@ -112,7 +113,7 @@ $stores = $block->getStoresSortedBySortOrder();
112
113
"Magento_Swatches/js/visual": <?= /* @noEscape */ $ block ->getJsonConfig () ?> ,
113
114
"Magento_Catalog/catalog/product/attribute/unique-validate": {
114
115
"element": "required-visual-swatch-unique",
115
- "message": "<?= $ block ->escapeHtml (__ ("The value of Admin must be unique. " )) ?> "
116
+ "message": "<?= $ escaper ->escapeHtml (__ ("The value of Admin must be unique. " )) ?> "
116
117
}
117
118
}
118
119
}
0 commit comments