10
10
11
11
$ stores = $ block ->getStoresSortedBySortOrder ();
12
12
?>
13
- <fieldset class="fieldset" >
14
- <legend class="legend"><span><?php /* @escapeNotVerified */ echo __ ('Manage Swatch (Values of Your Attribute) ' ) ?> </span></legend>
13
+ <fieldset class="fieldset">
14
+ <legend class="legend">
15
+ <span><?php echo $ block ->escapeHtml (__ ('Manage Swatch (Values of Your Attribute) ' )) ?> </span>
16
+ </legend>
15
17
<div id="swatch-text-options-panel">
16
18
<table class="data-table clearfix" cellspacing="0">
17
19
<thead>
18
20
<tr id="swatch-text-options-table">
19
21
<th class="col-draggable"></th>
20
- <th class="col-default"><span><?php /* @escapeNotVerified */ echo __ ('Is Default ' ) ?> </span></th>
22
+ <th class="col-default"><span><?php echo $ block -> escapeHtml ( __ ('Is Default ' ) ) ?> </span></th>
21
23
<?php foreach ($ stores as $ _store ): ?>
22
- <?php if ($ _store ->getId () != \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?>
23
- <th class="col-swatch col-<%- data.id %>"><span><?php /* @escapeNotVerified */ echo __ ('Swatch ' ); ?> </span></th>
24
- <?php endif ; ?>
25
- <th<?php if ($ _store ->getId () == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> class="_required"<?php endif ; ?> >
26
- <span><?php /* @escapeNotVerified */ echo $ _store ->getName () ?> </span>
24
+ <th class="col-swatch col-<%- data.id %>
25
+ <?php if ($ _store ->getId () == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> _required<?php endif ; ?> "
26
+ colspan="2">
27
+ <span><?php echo $ block ->escapeHtml ($ _store ->getName ()) ?> </span>
27
28
</th>
28
29
<?php endforeach ; ?>
29
30
<?php $ colTotal = count ($ stores ) * 2 + 3 ; ?>
@@ -39,11 +40,12 @@ $stores = $block->getStoresSortedBySortOrder();
39
40
</th>
40
41
</tr>
41
42
<tr>
42
- <th colspan="<?php /* @escapeNotVerified */ echo $ colTotal ; ?> " class="col-actions-add">
43
+ <th colspan="<?php echo ( int ) $ colTotal ; ?> " class="col-actions-add">
43
44
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()):?>
44
- <button id="add_new_swatch_text_option_button" title="<?php /* @escapeNotVerified */ echo __ ('Add Swatch ' ); ?> "
45
+ <button id="add_new_swatch_text_option_button"
46
+ title="<?php echo $ block ->escapeHtml (__ ('Add Swatch ' )); ?> "
45
47
type="button" class="action- scalable add">
46
- <span><?php /* @escapeNotVerified */ echo __ ('Add Swatch ' ); ?> </span>
48
+ <span><?php echo $ block -> escapeHtml ( __ ('Add Swatch ' ) ); ?> </span>
47
49
</button>
48
50
<?php endif ; ?>
49
51
</th>
@@ -56,30 +58,45 @@ $stores = $block->getStoresSortedBySortOrder();
56
58
<tr>
57
59
<td class="col-draggable">
58
60
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()): ?>
59
- <div data-role="draggable-handle" class="draggable-handle" title="<?php /* @escapeNotVerified */ echo __ ('Sort Option ' ); ?> "></div>
61
+ <div data-role="draggable-handle"
62
+ class="draggable-handle"
63
+ title="<?php echo $ block ->escapeHtml (__ ('Sort Option ' )); ?> "></div>
60
64
<?php endif ; ?>
61
- <input data-role="order" type="hidden" name="optiontext[order][<%- data.id %>]" value="<%- data.sort_order %>" <?php if ($ block ->getReadOnly () || $ block ->canManageOptionDefaultOnly ()): ?> disabled="disabled"<?php endif ; ?> />
65
+ <input data-role="order" type="hidden" name="optiontext[order][<%- data.id %>]"
66
+ value="<%- data.sort_order %>"
67
+ <?php if ($ block ->getReadOnly () || $ block ->canManageOptionDefaultOnly ()): ?> disabled="disabled"<?php endif ; ?>
68
+ />
62
69
</td>
63
70
<td class="col-default">
64
- <input class="input-radio" type="<%- data.intype %>" name="defaulttext[]" value="<%- data.id %>" <%- data.checked %><?php if ($ block ->getReadOnly ()):?> disabled="disabled"<?php endif ;?> />
71
+ <input class="input-radio"
72
+ type="<%- data.intype %>"
73
+ name="defaulttext[]"
74
+ value="<%- data.id %>" <%- data.checked %><?php if ($ block ->getReadOnly ()):?> disabled="disabled"<?php endif ;?> />
65
75
</td>
66
76
<?php foreach ($ stores as $ _store ): ?>
67
- <?php if ( $ _store ->getId () != \ Magento \ Store \ Model \Store:: DEFAULT_STORE_ID ): ?>
77
+ <?php $ storeId = ( int ) $ _store ->getId (); ?>
68
78
<td class="col-swatch col-<%- data.id %>">
69
- <input class="input-text swatch-text-field-<?php /* @escapeNotVerified */ echo $ _store ->getId () ?> <?php if ($ _store ->getId () == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> required-option<?php endif ; ?> " name="swatchtext[value][<%- data.id %>][<?php /* @escapeNotVerified */ echo $ _store ->getId () ?> ]" type="text" value="<%- data.swatch<?php /* @escapeNotVerified */ echo $ _store ->getId () ?> %>" />
79
+ <input class="input-text
80
+ swatch-text-field-<?php /* @noEscape */ echo $ storeId ; ?>
81
+ <?php if ($ storeId == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> required-option required-unique<?php endif ; ?> "
82
+ name="swatchtext[value][<%- data.id %>][<?php /* @noEscape */ echo $ storeId ; ?> ]"
83
+ type="text" value="<%- data.swatch<?php /* @noEscape */ echo $ storeId ; ?> %>"
84
+ placeholder="<?php echo $ block ->escapeHtml (__ ("Swatch " )); ?> "/>
70
85
</td>
71
- <?php endif ; ?>
72
86
<td class="swatch-col-<%- data.id %>">
73
- <input name="optiontext[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 ;?> />
87
+ <input name="optiontext[value][<%- data.id %>][<?php /* @noEscape */ echo $ storeId ; ?> ]"
88
+ value="<%- data.store<?php /* @noEscape */ echo $ storeId ; ?> %>"
89
+ class="input-text<?php if ($ storeId == \Magento \Store \Model \Store::DEFAULT_STORE_ID ): ?> required-option<?php endif ; ?> "
90
+ type="text" <?php if ($ block ->getReadOnly () || $ block ->canManageOptionDefaultOnly ()):?> disabled="disabled"<?php endif ;?>
91
+ placeholder="<?php echo __ ("Description " ); ?> " />
74
92
</td>
75
93
<?php endforeach ; ?>
76
94
<td id="delete_button_swatch_container_<%- data.id %>" class="col-delete">
77
95
<input type="hidden" class="delete-flag" name="optiontext[delete][<%- data.id %>]" value="" />
78
96
<?php if (!$ block ->getReadOnly () && !$ block ->canManageOptionDefaultOnly ()):?>
79
- <button title="<?php /* @escapeNotVerified */ echo __ ('Delete ' ) ?> " type="button"
80
- class="action- scalable delete delete-option"
81
- >
82
- <span><?php /* @escapeNotVerified */ echo __ ('Delete ' ) ?> </span>
97
+ <button title="<?php echo $ block ->escapeHtml (__ ('Delete ' )); ?> " type="button"
98
+ class="action- scalable delete delete-option">
99
+ <span><?php echo $ block ->escapeHtml (__ ('Delete ' )); ?> </span>
83
100
</button>
84
101
<?php endif ;?>
85
102
</td>
0 commit comments