Skip to content

Commit e76c4ed

Browse files
author
Hwashiang Yu
committed
MC-18153: Correct phtml templates
- Resolved static and integration test failures - Correct phtml templates
1 parent 7caf492 commit e76c4ed

File tree

25 files changed

+91
-71
lines changed

25 files changed

+91
-71
lines changed

app/code/Magento/AdvancedSearch/view/adminhtml/templates/system/config/testconnection.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
* See COPYING.txt for license details.
55
*/
66
?>
7-
<button class="scalable" type="button" id="<?= $block->getHtmlId() ?>" data-mage-init='{"testConnection":{
7+
<button class="scalable" type="button" id="<?= /* @noEscape */ $block->getHtmlId() ?>" data-mage-init='{"testConnection":{
88
"url": "<?= $block->escapeUrl($block->getAjaxUrl()) ?>",
9-
"elementId": "<?= $block->getHtmlId() ?>",
9+
"elementId": "<?= /* @noEscape */ $block->getHtmlId() ?>",
1010
"successText": "<?= $block->escapeHtmlAttr(__('Successful! Test again?')) ?>",
1111
"failedText": "<?= $block->escapeHtmlAttr(__('Connection failed! Test again?')) ?>",
1212
"fieldMapping": "<?= /* @noEscape */ $block->getFieldMapping() ?>"}, "validation": {}}'>
13-
<span id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_result"><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
13+
<span id="<?= /* @noEscape */ $block->getHtmlId() ?>_result"><?= $block->escapeHtml($block->getButtonLabel()) ?></span>
1414
</button>

app/code/Magento/Backend/view/adminhtml/templates/dashboard/graph.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
?>
77
<div class="dashboard-diagram">
88
<div class="dashboard-diagram-switcher">
9-
<label for="order_<?= $block->getHtmlId() ?>_period"
9+
<label for="order_<?= /* @noEscape */ $block->getHtmlId() ?>_period"
1010
class="label"><?= $block->escapeHtml(__('Select Range:')) ?></label>
11-
<select name="period" id="order_<?= $block->getHtmlId() ?>_period"
11+
<select name="period" id="order_<?= /* @noEscape */ $block->getHtmlId() ?>_period"
1212
onchange="changeDiagramsPeriod(this);" class="admin__control-select">
1313
<?php //phpcs:disable ?>
1414
<?php foreach ($this->helper(\Magento\Backend\Helper\Dashboard\Data::class)->getDatePeriods() as $value => $label) : ?>

app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/** @var $block \Magento\Backend\Block\Media\Uploader */
88
?>
99

10-
<div id="<?= $block->getHtmlId() ?>" class="uploader"
10+
<div id="<?= /* @noEscape */ $block->getHtmlId() ?>" class="uploader"
1111
data-mage-init='{
1212
"Magento_Backend/js/media-uploader" : {
1313
"maxFileSize": <?= /* @noEscape */ $block->getFileSizeService()->getMaxFileSize() ?>,
@@ -23,7 +23,7 @@
2323
data-url="<?= $block->escapeUrl($block->getConfig()->getUrl()) ?>" multiple="multiple" />
2424
</div>
2525
<div class="clear"></div>
26-
<script id="<?= $block->getHtmlId() ?>-template" type="text/x-magento-template" data-template="uploader">
26+
<script id="<?= /* @noEscape */ $block->getHtmlId() ?>-template" type="text/x-magento-template" data-template="uploader">
2727
<div id="<%- data.id %>" class="file-row">
2828
<span class="file-info"><%- data.name %> (<%- data.size %>)</span>
2929
<div class="progressbar-container">

app/code/Magento/Backend/view/adminhtml/templates/widget/accordion.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$items = $block->getItems();
1212
?>
1313
<?php if (!empty($items)) : ?>
14-
<dl id="tab_content_<?= $block->getHtmlId() ?>" name="tab_content_<?= $block->getHtmlId() ?>" class="accordion">
14+
<dl id="tab_content_<?= /* @noEscape */ $block->getHtmlId() ?>" name="tab_content_<?= /* @noEscape */ $block->getHtmlId() ?>" class="accordion">
1515
<?php foreach ($items as $_item) : ?>
1616
<?= $block->getChildHtml($_item->getId()) ?>
1717
<?php endforeach ?>
@@ -20,7 +20,7 @@ $items = $block->getItems();
2020
require([
2121
'mage/adminhtml/accordion'
2222
], function(){
23-
tab_content_<?= $block->getHtmlId() ?>AccordionJs = new varienAccordion('tab_content_<?= $block->getHtmlId() ?>', '<?= $block->escapeJs($block->getShowOnlyOne()) ?>');
23+
tab_content_<?= /* @noEscape */ $block->getHtmlId() ?>AccordionJs = new varienAccordion('tab_content_<?= /* @noEscape */ $block->getHtmlId() ?>', '<?= $block->escapeJs($block->getShowOnlyOne()) ?>');
2424
});
2525
</script>
2626
<?php endif; ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
4747
<?php endif; ?>
4848
<?php $countRecords = $block->getCollection()->getSize(); ?>
4949
<div class="admin__control-support-text">
50-
<span id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>-total-count" <?= /* @noEscape */ $block->getUiId('total-count') ?>>
50+
<span id="<?= /* @noEscape */ $block->getHtmlId() ?>-total-count" <?= /* @noEscape */ $block->getUiId('total-count') ?>>
5151
<?= /* @noEscape */ $countRecords ?>
5252
</span>
5353
<?= $block->escapeHtml(__('records found')) ?>
54-
<span id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_massaction-count"
54+
<span id="<?= /* @noEscape */ $block->getHtmlId() ?>_massaction-count"
5555
class="mass-select-info _empty"><strong data-role="counter">0</strong> <span><?= $block->escapeHtml(__('selected')) ?></span></span>
5656
</div>
5757
<?php if ($block->getPagerVisibility()) : ?>
5858
<div class="admin__data-grid-pager-wrap">
5959
<select name="<?= $block->escapeHtmlAttr($block->getVarNameLimit()) ?>"
60-
id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_page-limit"
60+
id="<?= /* @noEscape */ $block->getHtmlId() ?>_page-limit"
6161
onchange="<?= /* @noEscape */ $block->getJsObjectName() ?>.loadByElement(this)" <?= /* @noEscape */ $block->getUiId('per-page') ?>
6262
class="admin__control-select">
6363
<option value="20"<?php if ($block->getCollection()->getPageSize() == 20) : ?>
@@ -76,7 +76,7 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
7676
selected="selected"<?php endif; ?>>200
7777
</option>
7878
</select>
79-
<label for="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_page-limit"
79+
<label for="<?= /* @noEscape */ $block->getHtmlId() ?>_page-limit"
8080
class="admin__control-support-text"><?= $block->escapeHtml(__('per page')) ?></label>
8181
<div class="admin__data-grid-pager">
8282
<?php $_curPage = $block->getCollection()->getCurPage() ?>
@@ -93,13 +93,13 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
9393
<?php endif; ?>
9494

9595
<input type="text"
96-
id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_page-current"
96+
id="<?= /* @noEscape */ $block->getHtmlId() ?>_page-current"
9797
name="<?= $block->escapeHtmlAttr($block->getVarNamePage()) ?>"
9898
value="<?= $block->escapeHtmlAttr($_curPage) ?>"
9999
class="admin__control-text"
100100
onkeypress="<?= /* @noEscape */ $block->getJsObjectName() ?>.inputPage(event, '<?= /* @noEscape */ $_lastPage ?>')" <?= /* @noEscape */ $block->getUiId('current-page') ?> />
101101

102-
<label class="admin__control-support-text" for="<?= $block->escapeHtmlAttr($block->getHtmlId())
102+
<label class="admin__control-support-text" for="<?= /* @noEscape */ $block->getHtmlId()
103103
?>_page-current">
104104
<?= /* @noEscape */ __('of %1', '<span>' . $block->getCollection()->getLastPageNumber() . '</span>') ?>
105105
</label>

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,18 @@ $numColumns = count($block->getColumns());
5858
<?php endif; ?>
5959
<?php $countRecords = $block->getCollection()->getSize(); ?>
6060
<div class="admin__control-support-text">
61-
<span id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>-total-count" <?= /* @noEscape */ $block->getUiId('total-count') ?>>
61+
<span id="<?= /* @noEscape */ $block->getHtmlId() ?>-total-count" <?= /* @noEscape */ $block->getUiId('total-count') ?>>
6262
<?= /* @noEscape */ $countRecords ?>
6363
</span>
6464
<?= $block->escapeHtml(__('records found')) ?>
65-
<span id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_massaction-count"
65+
<span id="<?= /* @noEscape */ $block->getHtmlId() ?>_massaction-count"
6666
class="mass-select-info _empty"><strong data-role="counter">0</strong> <span><?= $block->escapeHtml(__('selected')) ?></span></span>
6767
</div>
6868

6969
<?php if ($block->getPagerVisibility()) : ?>
7070
<div class="admin__data-grid-pager-wrap">
7171
<select name="<?= $block->escapeHtmlAttr($block->getVarNameLimit()) ?>"
72-
id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_page-limit"
72+
id="<?= /* @noEscape */ $block->getHtmlId() ?>_page-limit"
7373
onchange="<?= /* @noEscape */ $block->getJsObjectName() ?>.loadByElement(this)"
7474
class="admin__control-select">
7575
<option value="20"<?php if ($block->getCollection()->getPageSize() == 20) : ?>
@@ -88,7 +88,7 @@ $numColumns = count($block->getColumns());
8888
selected="selected"<?php endif; ?>>200
8989
</option>
9090
</select>
91-
<label for="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?><?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_page-limit"
91+
<label for="<?= /* @noEscape */ $block->getHtmlId() ?><?= /* @noEscape */ $block->getHtmlId() ?>_page-limit"
9292
class="admin__control-support-text"><?= $block->escapeHtml(__('per page')) ?></label>
9393

9494
<div class="admin__data-grid-pager">
@@ -104,12 +104,12 @@ $numColumns = count($block->getColumns());
104104
<button type="button" class="action-previous disabled"><span><?= $block->escapeHtml(__('Previous page')) ?></span></button>
105105
<?php endif; ?>
106106
<input type="text"
107-
id="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_page-current"
107+
id="<?= /* @noEscape */ $block->getHtmlId() ?>_page-current"
108108
name="<?= $block->escapeHtmlAttr($block->getVarNamePage()) ?>"
109109
value="<?= $block->escapeHtmlAttr($_curPage) ?>"
110110
class="admin__control-text"
111111
onkeypress="<?= /* @noEscape */ $block->getJsObjectName() ?>.inputPage(event, '<?= /* @noEscape */ $_lastPage ?>')" <?= /* @noEscape */ $block->getUiId('current-page') ?> />
112-
<label class="admin__control-support-text" for="<?= $block->escapeHtmlAttr($block->getHtmlId()) ?>_page-current">
112+
<label class="admin__control-support-text" for="<?= /* @noEscape */ $block->getHtmlId() ?>_page-current">
113113
<?= /* @noEscape */ __('of %1', '<span>' . $block->getCollection()->getLastPageNumber() . '</span>') ?>
114114
</label>
115115
<?php if ($_curPage < $_lastPage) : ?>

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction.phtml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@
55
*/
66
?>
77
<?= /* @noEscape */ $block->getSomething() ?>
8-
<div id="<?= $block->getHtmlId() ?>" class="admin__grid-massaction">
8+
<div id="<?= /* @noEscape */ $block->getHtmlId() ?>" class="admin__grid-massaction">
99

1010
<?php if ($block->getHideFormElement() !== true) : ?>
11-
<form action="" id="<?= $block->getHtmlId() ?>-form" method="post">
11+
<form action="" id="<?= /* @noEscape */ $block->getHtmlId() ?>-form" method="post">
1212
<?php endif ?>
1313
<div class="admin__grid-massaction-form">
1414
<?= $block->getBlockHtml('formkey') ?>
1515
<select
16-
id="<?= $block->getHtmlId() ?>-select"
16+
id="<?= /* @noEscape */ $block->getHtmlId() ?>-select"
1717
class="required-entry local-validation admin__control-select"
1818
<?= /* @noEscape */ $block->getUiId('select') ?>>
1919
<option class="admin__control-select-placeholder" value="" selected><?= $block->escapeHtml(__('Actions')) ?></option>
2020
<?php foreach ($block->getItems() as $_item) : ?>
2121
<option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"<?= ($_item->getSelected() ? ' selected="selected"' : '') ?>><?= $block->escapeHtml($_item->getLabel()) ?></option>
2222
<?php endforeach; ?>
2323
</select>
24-
<span class="outer-span" id="<?= $block->getHtmlId() ?>-form-hiddens"></span>
25-
<span class="outer-span" id="<?= $block->getHtmlId() ?>-form-additional"></span>
24+
<span class="outer-span" id="<?= /* @noEscape */ $block->getHtmlId() ?>-form-hiddens"></span>
25+
<span class="outer-span" id="<?= /* @noEscape */ $block->getHtmlId() ?>-form-additional"></span>
2626
<?= $block->getApplyButtonHtml() ?>
2727
</div>
2828
<?php if ($block->getHideFormElement() !== true) :?>
2929
</form>
3030
<?php endif ?>
3131
<div class="no-display">
3232
<?php foreach ($block->getItems() as $_item) : ?>
33-
<div id="<?= $block->getHtmlId() ?>-item-<?= /* @noEscape */ $_item->getId() ?>-block">
33+
<div id="<?= /* @noEscape */ $block->getHtmlId() ?>-item-<?= /* @noEscape */ $_item->getId() ?>-block">
3434
<?php if ('' != $_item->getBlockName()) :?>
3535
<?= $block->getChildHtml($_item->getBlockName()) ?>
3636
<?php endif;?>
@@ -40,7 +40,7 @@
4040

4141
<div class="mass-select-wrap">
4242
<select
43-
id="<?= $block->getHtmlId() ?>-mass-select"
43+
id="<?= /* @noEscape */ $block->getHtmlId() ?>-mass-select"
4444
class="action-select-multiselect _disabled"
4545
disabled="disabled"
4646
data-menu="grid-mass-select">
@@ -62,13 +62,13 @@
6262
</option>
6363
</optgroup>
6464
</select>
65-
<label for="<?= $block->getHtmlId() ?>-mass-select"></label>
65+
<label for="<?= /* @noEscape */ $block->getHtmlId() ?>-mass-select"></label>
6666
</div>
6767

6868
<script>
6969
require(['jquery', 'domReady!'], function($){
7070
'use strict';
71-
$('#<?= $block->getHtmlId() ?>-mass-select')
71+
$('#<?= /* @noEscape */ $block->getHtmlId() ?>-mass-select')
7272
.removeClass('_disabled')
7373
.prop('disabled', false)
7474
.change(function () {

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/massaction_extended.phtml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,38 @@
44
* See COPYING.txt for license details.
55
*/
66
?>
7-
<div id="<?= $block->getHtmlId() ?>" class="admin__grid-massaction">
7+
<div id="<?= /* @noEscape */ $block->getHtmlId() ?>" class="admin__grid-massaction">
88

99
<?php if ($block->getHideFormElement() !== true) : ?>
10-
<form action="" id="<?= $block->getHtmlId() ?>-form" method="post">
10+
<form action="" id="<?= /* @noEscape */ $block->getHtmlId() ?>-form" method="post">
1111
<?php endif ?>
1212
<div class="admin__grid-massaction-form">
1313
<?= $block->getBlockHtml('formkey') ?>
1414
<select
15-
id="<?= $block->getHtmlId() ?>-select"
15+
id="<?= /* @noEscape */ $block->getHtmlId() ?>-select"
1616
class="required-entry local-validation admin__control-select">
1717
<option class="admin__control-select-placeholder" value="" selected><?= $block->escapeHtml(__('Actions')) ?></option>
1818
<?php foreach ($block->getItems() as $_item) : ?>
1919
<option value="<?= $block->escapeHtmlAttr($_item->getId()) ?>"<?= ($_item->getSelected() ? ' selected="selected"' : '') ?>><?= $block->escapeHtml($_item->getLabel()) ?></option>
2020
<?php endforeach; ?>
2121
</select>
22-
<span class="outer-span" id="<?= $block->getHtmlId() ?>-form-hiddens"></span>
23-
<span class="outer-span" id="<?= $block->getHtmlId() ?>-form-additional"></span>
22+
<span class="outer-span" id="<?= /* @noEscape */ $block->getHtmlId() ?>-form-hiddens"></span>
23+
<span class="outer-span" id="<?= /* @noEscape */ $block->getHtmlId() ?>-form-additional"></span>
2424
<?= $block->getApplyButtonHtml() ?>
2525
</div>
2626
<?php if ($block->getHideFormElement() !== true) : ?>
2727
</form>
2828
<?php endif ?>
2929
<div class="no-display">
3030
<?php foreach ($block->getItems() as $_item) : ?>
31-
<div id="<?= $block->getHtmlId() ?>-item-<?= /* @noEscape */ $_item->getId() ?>-block">
31+
<div id="<?= /* @noEscape */ $block->getHtmlId() ?>-item-<?= /* @noEscape */ $_item->getId() ?>-block">
3232
<?= $_item->getAdditionalActionBlockHtml() ?>
3333
</div>
3434
<?php endforeach; ?>
3535
</div>
3636
<div class="mass-select-wrap">
3737
<select
38-
id="<?= $block->getHtmlId() ?>-mass-select"
38+
id="<?= /* @noEscape */ $block->getHtmlId() ?>-mass-select"
3939
class="action-select-multiselect"
4040
data-menu="grid-mass-select">
4141
<optgroup label="<?= $block->escapeHtmlAttr(__('Mass Actions')) ?>">
@@ -56,12 +56,12 @@
5656
</option>
5757
</optgroup>
5858
</select>
59-
<label for="<?= $block->getHtmlId() ?>-mass-select"></label>
59+
<label for="<?= /* @noEscape */ $block->getHtmlId() ?>-mass-select"></label>
6060
</div>
6161
<script>
6262
require(['jquery'], function($){
6363
'use strict';
64-
$('#<?= $block->getHtmlId() ?>-mass-select').change(function () {
64+
$('#<?= /* @noEscape */ $block->getHtmlId() ?>-mass-select').change(function () {
6565
var massAction = $('option:selected', this).val();
6666
switch (massAction) {
6767
<?php if ($block->getUseSelectAll()) : ?>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
$elementName = $block->getElement()->getName() . '[images]';
1111
$formName = $block->getFormName();
1212
?>
13-
<div id="<?= $block->getHtmlId() ?>"
13+
<div id="<?= /* @noEscape */ $block->getHtmlId() ?>"
1414
class="gallery"
15-
data-mage-init='{"productGallery":{"template":"#<?= $block->getHtmlId() ?>-template"}}'
15+
data-mage-init='{"productGallery":{"template":"#<?= /* @noEscape */ $block->getHtmlId() ?>-template"}}'
1616
data-parent-component="<?= $block->escapeHtmlAttr($block->getData('config/parentComponent')) ?>"
1717
data-images="<?= $block->escapeHtmlAttr($block->getImagesJson()) ?>"
1818
data-types="<?= $block->escapeHtmlAttr(
@@ -39,7 +39,7 @@ $formName = $block->getFormName();
3939
<?php
4040
} ?>
4141

42-
<script id="<?= $block->getHtmlId() ?>-template" type="text/x-magento-template">
42+
<script id="<?= /* @noEscape */ $block->getHtmlId() ?>-template" type="text/x-magento-template">
4343
<div class="image item<% if (data.disabled == 1) { %> hidden-for-front<% } %>"
4444
data-role="image">
4545
<input type="hidden"

0 commit comments

Comments
 (0)