11
11
$ stores = $ block ->getStoresSortedBySortOrder ();
12
12
?>
13
13
<fieldset class="fieldset">
14
- <legend class="legend"><span><?php /* @escapeNotVerified */ echo __ ('Manage Swatch (Values of Your Attribute) ' ) ?> </span></legend>
14
+ <legend class="legend"><span><?php echo $ block -> escapeHtml ( __ ('Manage Swatch (Values of Your Attribute) ' )); ?> </span></legend>
15
15
<div id="swatch-visual-options-panel">
16
16
<table class="data-table clearfix" cellspacing="0">
17
17
<thead>
18
18
<tr id="swatch-visual-options-table">
19
19
<th class="col-draggable"></th>
20
- <th class="col-default"><span><?php /* @escapeNotVerified */ echo __ ('Is Default ' ) ?> </span></th>
21
- <th><span><?php /* @escapeNotVerified */ echo __ ('Swatch ' ) ?> </span></th>
20
+ <th class="col-default"><span><?php echo $ block -> escapeHtml ( __ ('Is Default ' ) ) ?> </span></th>
21
+ <th><span><?php echo $ block -> escapeHtml ( __ ('Swatch ' ) ) ?> </span></th>
22
22
<?php foreach ($ stores as $ _store ): ?>
23
23
<th<?php if ($ _store ->getId () == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> class="_required"<?php endif ; ?> >
24
- <span><?php /* @escapeNotVerified */ echo $ _store ->getName () ?> </span>
24
+ <span><?php echo $ block -> escapeHtml ( $ _store ->getName () ) ?> </span>
25
25
</th>
26
26
<?php endforeach ;
27
27
$ colTotal = count ($ stores ) * 2 + 3 ;
@@ -38,11 +38,12 @@ $stores = $block->getStoresSortedBySortOrder();
38
38
</th>
39
39
</tr>
40
40
<tr>
41
- <th colspan="<?php /* @escapeNotVerified */ echo $ colTotal ; ?> " class="col-actions-add">
42
- <?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()):?>
43
- <button id="add_new_swatch_visual_option_button" title="<?php /* @escapeNotVerified */ echo __ ('Add Swatch ' ); ?> "
41
+ <th colspan="<?php echo (int )$ colTotal ; ?> " class="col-actions-add">
42
+ <?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()): ?>
43
+ <button id="add_new_swatch_visual_option_button"
44
+ title="<?php echo $ block ->escapeHtml (__ ('Add Swatch ' )); ?> "
44
45
type="button" class="action- scalable add">
45
- <span><?php /* @escapeNotVerified */ echo __ ('Add Swatch ' ); ?> </span>
46
+ <span><?php echo $ block -> escapeHtml ( __ ('Add Swatch ' ) ); ?> </span>
46
47
</button>
47
48
<?php endif ; ?>
48
49
</th>
@@ -55,7 +56,8 @@ $stores = $block->getStoresSortedBySortOrder();
55
56
<tr>
56
57
<td class="col-draggable">
57
58
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()): ?>
58
- <div data-role="draggable-handle" class="draggable-handle" title="<?php /* @escapeNotVerified */ echo __ ('Sort Option ' ); ?> "></div>
59
+ <div data-role="draggable-handle" class="draggable-handle"
60
+ title="<?php echo $ block ->escapeHtml (__ ('Sort Option ' )); ?> "></div>
59
61
<?php endif ; ?>
60
62
<input data-role="order" type="hidden" name="optionvisual[order][<%- data.id %>]" value="<%- data.sort_order %>" <?php if ($ block ->getReadOnly () || $ block ->canManageOptionDefaultOnly ()): ?> disabled="disabled"<?php endif ; ?> />
61
63
</td>
@@ -69,33 +71,35 @@ $stores = $block->getStoresSortedBySortOrder();
69
71
<div class="swatch_sub-menu_container" id="swatch_container_option_<%- data.id %>">
70
72
<div class="swatch_row position-relative">
71
73
<div class="swatch_row_name colorpicker_handler">
72
- <p><?php /* @escapeNotVerified */ echo __ ('Choose a color ' ); ?> </p>
74
+ <p><?php echo $ block -> escapeHtml ( __ ('Choose a color ' ) ); ?> </p>
73
75
</div>
74
76
</div>
75
77
<div class="swatch_row">
76
78
<div class="swatch_row_name btn_choose_file_upload" id="swatch_choose_file_option_<%- data.id %>">
77
- <p><?php /* @escapeNotVerified */ echo __ ('Upload a file ' ); ?> </p>
79
+ <p><?php echo $ block -> escapeHtml ( __ ('Upload a file ' ) ); ?> </p>
78
80
</div>
79
81
</div>
80
82
<div class="swatch_row">
81
83
<div class="swatch_row_name btn_remove_swatch">
82
- <p><?php /* @escapeNotVerified */ echo __ ('Clear ' ); ?> </p>
84
+ <p><?php echo $ block -> escapeHtml ( __ ('Clear ' ) ); ?> </p>
83
85
</div>
84
86
</div>
85
87
</div>
86
88
</td>
87
89
<?php foreach ($ stores as $ _store ): ?>
88
90
<td class="swatch-col-<%- data.id %>">
89
- <input name="optionvisual[value][<%- data.id %>][<?php /* @escapeNotVerified */ echo $ _store ->getId () ?> ]" value="<%- data.store<?php /* @escapeNotVerified */ echo $ _store ->getId () ?> %>" class="input-text<?php if ($ _store ->getId () == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> required-option required-unique<?php endif ; ?> " type="text" <?php if ($ block ->getReadOnly () || $ block ->canManageOptionDefaultOnly ()):?> disabled="disabled"<?php endif ;?> />
91
+ <input name="optionvisual[value][<%- data.id %>][<?php echo (int )$ _store ->getId () ?> ]"
92
+ value="<%- data.store<?php echo (int ) $ _store ->getId () ?> %>"
93
+ class="input-text<?php if ($ _store ->getId () == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> required-option required-unique<?php endif ; ?> "
94
+ type="text" <?php if ($ block ->getReadOnly () || $ block ->canManageOptionDefaultOnly ()): ?> disabled="disabled"<?php endif ; ?> />
90
95
</td>
91
96
<?php endforeach ; ?>
92
97
<td id="delete_button_swatch_container_<%- data.id %>" class="col-delete">
93
98
<input type="hidden" class="delete-flag" name="optionvisual[delete][<%- data.id %>]" value="" />
94
99
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()):?>
95
- <button title="<?php /* @escapeNotVerified */ echo __ ('Delete ' ) ?> " type="button"
96
- class="action- scalable delete delete-option"
97
- >
98
- <span><?php /* @escapeNotVerified */ echo __ ('Delete ' ) ?> </span>
100
+ <button title="<?php echo $ block ->escapeHtml (__ ('Delete ' )) ?> " type="button"
101
+ class="action- scalable delete delete-option">
102
+ <span><?php echo $ block ->escapeHtml (__ ('Delete ' )) ?> </span>
99
103
</button>
100
104
<?php endif ;?>
101
105
</td>
@@ -104,10 +108,10 @@ $stores = $block->getStoresSortedBySortOrder();
104
108
<script type="text/x-magento-init">
105
109
{
106
110
"*": {
107
- "Magento_Swatches/js/visual": <?php /* @escapeNotVerified */ echo $ block ->getJsonConfig (); ?> ,
111
+ "Magento_Swatches/js/visual": <?php /* @noEscape */ echo $ block ->getJsonConfig (); ?> ,
108
112
"Magento_Catalog/catalog/product/attribute/unique-validate": {
109
113
"element": "required-visual-swatch-unique",
110
- "message": "<?php echo __ ("The value of Admin must be unique. " ) ?> "
114
+ "message": "<?php echo $ block -> escapeHtml ( __ ("The value of Admin must be unique. " )); ?> "
111
115
}
112
116
}
113
117
}
0 commit comments