Skip to content

Commit

Permalink
Convert long form tags with echo to short-echo tags
Browse files Browse the repository at this point in the history
Also unify existing short-echo padding. Resolves magento#107. PR magento#1563.
  • Loading branch information
davidalger committed Jun 9, 2017
1 parent d844e31 commit 01e9cb4
Show file tree
Hide file tree
Showing 647 changed files with 3,277 additions and 3,277 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@

<?php if ($block->getCriticalCount()): ?>
<div class="message message-warning error">
<a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Critical System Messages'));?>">
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Critical System Messages')) ?>">
<?php /* @escapeNotVerified */ echo $block->getCriticalCount();?>
</a>
</div>
<?php endif;?>

<?php if ($block->getMajorCount()): ?>
<div class="message message-warning warning">
<a class="message-link" href="#" title="<?php echo $block->escapeHtml(__('Major System Messages'));?>">
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Major System Messages')) ?>">
<?php /* @escapeNotVerified */ echo $block->getMajorCount();?>
</a>
</div>
<?php endif;?>
</div>
<div id="message-system-all" title="<?php echo $block->escapeHtml(__('System messages'));?>" data-mage-init='<?php echo $block->escapeHtml($block->getSystemMessageDialogJson());?>'></div>
<div id="message-system-all" title="<?= $block->escapeHtml(__('System messages')) ?>" data-mage-init='<?= $block->escapeHtml($block->getSystemMessageDialogJson()) ?>'></div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
?>
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ ?>

<div style="display:none" id="system_messages_list" data-role="system_messages_list" title="<?php echo $block->escapeHtml($block->getPopupTitle()); ?>">
<div style="display:none" id="system_messages_list" data-role="system_messages_list" title="<?= $block->escapeHtml($block->getPopupTitle()) ?>">
<ul class="message-system-list messages">
<?php foreach ($block->getUnreadMessages() as $message): ?>
<li class="message message-warning <?php /* @escapeNotVerified */ echo $block->getItemClass($message);?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
$notificationDescriptionLength = $block->getNotificationDescriptionLength();
?>
<strong class="notifications-entry-title">
<?php echo $block->escapeHtml($notification->getTitle()); ?>
<?= $block->escapeHtml($notification->getTitle()) ?>
</strong>
<?php if (strlen($notificationDescription) > $notificationDescriptionLength) : ?>
<p class="notifications-entry-description _cutted">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
<section class="dashboard-advanced-reports" data-index="dashboard-advanced-reports">
<div class="dashboard-advanced-reports-description">
<header class="dashboard-advanced-reports-title">
<?php echo $block->escapeHtml(__('Advanced Reporting')) ?>
<?= $block->escapeHtml(__('Advanced Reporting')) ?>
</header>
<div class="dashboard-advanced-reports-content">
<?php echo $block->escapeHtml(__('Gain new insights and take command of your business\' performance,' .
<?= $block->escapeHtml(__('Gain new insights and take command of your business\' performance,' .
' using our dynamic product, order, and customer reports tailored to your customer data.')) ?>
<a href="<?php echo $block->escapeUrl($block->getUrl('analytics/reports/show')); ?>"
<a href="<?= $block->escapeUrl($block->getUrl('analytics/reports/show')) ?>"
target="_blank"
data-index="analytics-service-info-link">
<?php echo $block->escapeHtml(__('View details')) ?>
<?= $block->escapeHtml(__('View details')) ?>
</a>
</div>
</div>
<div class="dashboard-advanced-reports-actions">
<a href="<?php echo $block->escapeUrl($block->getUrl('analytics/reports/show')); ?>"
<a href="<?= $block->escapeUrl($block->getUrl('analytics/reports/show')) ?>"
target="_blank"
class="action action-advanced-reports"
data-index="analytics-service-link"
title="<?php echo $block->escapeHtmlAttr(__('Go to Advanced Reporting')) ?>">
<span><?php echo $block->escapeHtml(__('Go to Advanced Reporting')) ?></span>
title="<?= $block->escapeHtmlAttr(__('Go to Advanced Reporting')) ?>">
<span><?= $block->escapeHtml(__('Go to Advanced Reporting')) ?></span>
</a>
</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ $helper = $block->getHelper('adminhtml');
<head>
<script>
<?php if (isset($params['redirect'])): ?>
window.location="<?php echo $block->escapeUrl($params['redirect']); ?>";
window.location="<?= $block->escapeUrl($params['redirect']) ?>";
<?php endif; ?>
<?php if (isset($params['redirect_parent'])): ?>
window.top.location="<?php echo $block->escapeUrl($params['redirect_parent']); ?>";
window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
<?php endif; ?>
<?php if (isset($params['error_msg'])): ?>
window.top.directPostModel.showError(<?php /* @noEscape */ echo json_encode((array)$params['error_msg']); ?>);
<?php if (isset($params['x_invoice_num'])): ?>
window.top.directPostModel.successUrl="<?php echo $block->escapeUrl($helper->getSuccessOrderUrl($params)); ?>";
window.top.directPostModel.successUrl="<?= $block->escapeUrl($helper->getSuccessOrderUrl($params)) ?>";
<?php endif; ?>
<?php endif; ?>
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
<!-- IFRAME for request to our server -->
<iframe id="order-directpost-iframe" allowtransparency="true" frameborder="0" name="iframeSubmitOrder"
style="display:none;width:100%;background-color:transparent"
src="<?php echo $block->escapeUrl($block->getViewFileUrl('blank.html')); ?>">
src="<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>">
</iframe>
<!-- IFRAME for request to Authorize.net -->
<iframe id="directpost-iframe" allowtransparency="true" frameborder="0" name="iframeDirectPost"
style="display:none;width:100%;background-color:transparent"
src="<?php echo $block->escapeUrl($block->getViewFileUrl('blank.html')); ?>">
src="<?= $block->escapeUrl($block->getViewFileUrl('blank.html')) ?>">
</iframe>
<fieldset class="admin__fieldset payment-method" id="payment_form_<?php /* @noEscape */ echo $code; ?>"
style="display:none;">
<div class="admin__field _required">
<label for="<?php /* @noEscape */ echo $code; ?>_cc_type" class="admin__field-label">
<span><?php echo $block->escapeHtml(__('Credit Card Type')); ?></span>
<span><?= $block->escapeHtml(__('Credit Card Type')) ?></span>
</label>
<div class="admin__field-control">
<select id="<?php /* @noEscape */ echo $code; ?>_cc_type" name="payment[cc_type]"
Expand All @@ -40,11 +40,11 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
'required':true,
'validate-cc-type-select':'#<?php /* @noEscape */ echo $code; ?>_cc_number'
}">
<option value=""><?php echo $block->escapeHtml(__('Please Select')); ?></option>
<option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
<option value="<?php echo $block->escapeHtml($typeCode); ?>"
<option value="<?= $block->escapeHtml($typeCode) ?>"
<?php if ($typeCode == $ccType): ?>selected="selected"<?php endif; ?>>
<?php echo $block->escapeHtml($typeName); ?>
<?= $block->escapeHtml($typeName) ?>
</option>
<?php endforeach; ?>
</select>
Expand All @@ -53,7 +53,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');

<div class="admin__field _required">
<label for="<?php /* @noEscape */ echo $code; ?>_cc_number" class="admin__field-label">
<span><?php echo $block->escapeHtml(__('Credit Card Number')); ?></span>
<span><?= $block->escapeHtml(__('Credit Card Number')) ?></span>
</label>
<div class="admin__field-control">
<input type="text" id="<?php /* @noEscape */ echo $code; ?>_cc_number"
Expand All @@ -70,7 +70,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');

<div class="admin__field _required field-date" id="<?php /* @noEscape */ echo $code; ?>_cc_type_exp_div">
<label for="<?php /* @noEscape */ echo $code; ?>_expiration" class="admin__field-label">
<span><?php echo $block->escapeHtml(__('Expiration Date')); ?></span>
<span><?= $block->escapeHtml(__('Expiration Date')) ?></span>
</label>

<div class="admin__field-control">
Expand All @@ -82,9 +82,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
'validate-cc-exp':'#<?php /* @noEscape */ echo $code; ?>_expiration_yr'
}">
<?php foreach ($block->getCcMonths() as $k => $v): ?>
<option value="<?php echo $block->escapeHtml($k); ?>"
<option value="<?= $block->escapeHtml($k) ?>"
<?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif; ?>>
<?php echo $block->escapeHtml($v); ?>
<?= $block->escapeHtml($v) ?>
</option>
<?php endforeach; ?>
</select>
Expand All @@ -96,7 +96,7 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
<?php foreach ($block->getCcYears() as $k => $v): ?>
<option value="<?php /* @noEscape */ echo $k ? $block->escapeHtml($k) : ''; ?>"
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif; ?>>
<?php echo $block->escapeHtml($v); ?>
<?= $block->escapeHtml($v) ?>
</option>
<?php endforeach; ?>
</select>
Expand All @@ -108,13 +108,13 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
<label class="admin__field-label"
for="<?php /* @noEscape */ echo $code; ?>_cc_cid"
id="<?php /* @noEscape */ echo $code; ?>_cc_type_cvv_div">
<span><?php echo $block->escapeHtml(__('Card Verification Number')); ?></span>
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
</label>

<div class="admin__field-control">
<input type="text"
data-container="<?php /* @noEscape */ echo $code; ?>-cc-cvv"
title="<?php echo $block->escapeHtml(__('Card Verification Number')); ?>"
title="<?= $block->escapeHtml(__('Card Verification Number')) ?>"
class="admin__control-text cvv"
id="<?php /* @noEscape */ echo $code; ?>_cc_cid" name="payment[cc_cid]"
value="<?php /* @noEscape */ echo $block->getInfoData('cc_cid') ?>"
Expand Down Expand Up @@ -149,8 +149,8 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
'directpost-iframe',
'<?php /* @noEscape */ echo $controller; ?>',
'<?php /* @noEscape */ echo $orderUrl; ?>',
'<?php echo $block->escapeUrl($method->getCgiUrl()); ?>',
'<?php echo $block->escapeUrl($block->getUrl('*/*/save', [
'<?= $block->escapeUrl($method->getCgiUrl()) ?>',
'<?= $block->escapeUrl($block->getUrl('*/*/save', [
'_secure' => $block->getRequest()->isSecure()
]));?>');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,41 @@ $fraudDetails = $payment->getAdditionalInformation('fraud_details');

<?php if (!empty($fraudDetails)): ?>
<div class="admin__page-section-item-title">
<span class="title"><?php echo $block->escapeHtml(__('Fraud Detection ')); ?></span>
<span class="title"><?= $block->escapeHtml(__('Fraud Detection ')) ?></span>
</div>

<div class="admin__page-section-item-content">
<div class="order-payment-additional">
<?php if(!empty($fraudDetails['fds_filter_action'])): ?>
<?php echo $block->escapeHtml(__('FDS Filter Action')); ?>:
<?php echo $block->escapeHtml($fraudDetails['fds_filter_action']); ?>
<?= $block->escapeHtml(__('FDS Filter Action')) ?>:
<?= $block->escapeHtml($fraudDetails['fds_filter_action']) ?>
</br>
<?php endif; ?>

<?php if(!empty($fraudDetails['avs_response'])): ?>
<?php echo $block->escapeHtml(__('AVS Response')); ?>:
<?php echo $block->escapeHtml($fraudDetails['avs_response']); ?>
<?= $block->escapeHtml(__('AVS Response')) ?>:
<?= $block->escapeHtml($fraudDetails['avs_response']) ?>
</br>
<?php endif; ?>

<?php if(!empty($fraudDetails['card_code_response'])): ?>
<?php echo $block->escapeHtml(__('Card Code Response')); ?>:
<?php echo $block->escapeHtml($fraudDetails['card_code_response']); ?>
<?= $block->escapeHtml(__('Card Code Response')) ?>:
<?= $block->escapeHtml($fraudDetails['card_code_response']) ?>
</br>
<?php endif; ?>

<?php if(!empty($fraudDetails['cavv_response']) || ($fraudDetails['cavv_response'] === 0)): ?>
<?php echo $block->escapeHtml(__('CAVV Response')); ?>:
<?php echo $block->escapeHtml($fraudDetails['cavv_response']); ?>
<?= $block->escapeHtml(__('CAVV Response')) ?>:
<?= $block->escapeHtml($fraudDetails['cavv_response']) ?>
</br>
<?php endif; ?>

<?php if(!empty($fraudDetails['fraud_filters'])): ?>
<b><?php echo $block->escapeHtml(__('Fraud Filters')); ?>:
<b><?= $block->escapeHtml(__('Fraud Filters')) ?>:
</b></br>
<?php foreach($fraudDetails['fraud_filters'] as $filter): ?>
<?php echo $block->escapeHtml($filter['name']); ?>:
<?php echo $block->escapeHtml($filter['action']); ?>
<?= $block->escapeHtml($filter['name']) ?>:
<?= $block->escapeHtml($filter['action']) ?>
</br>
<?php endforeach; ?>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
/>
</div>
</div>
<?php echo $block->getChildHtml('form.additional.info'); ?>
<?= $block->getChildHtml('form.additional.info') ?>
<div class="form-actions">
<?php echo $block->getChildHtml('form.buttons'); ?>
<?= $block->getChildHtml('form.buttons') ?>
</div>
</fieldset>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
<?php if ($block->getChildHtml('left')): ?>
<div class="columns <?php /* @escapeNotVerified */ echo $block->getContainerCssClass() ?>" id="page:container">
<div id="page:left" class="side-col">
<?php echo $block->getChildHtml('left') ?>
<?= $block->getChildHtml('left') ?>
</div>
<div class="main-col" id="content">
<div class="main-col-inner">
<div id="messages" class="messages" data-container-for="messages">
<?php echo $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
<?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
</div>
<?php echo $block->getChildHtml('content') ?>
<?= $block->getChildHtml('content') ?>
</div>
</div>
</div>
<?php else: ?>
<div id="messages" data-container-for="messages"><?php echo $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?></div>
<?php echo $block->getChildHtml('content') ?>
<div id="messages" data-container-for="messages"><?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?></div>
<?= $block->getChildHtml('content') ?>
<?php endif; ?>
</div>
</div>
<?php if ($block->getChildHtml('footer')): ?>
<div class="footer">
<?php echo $block->getChildHtml('footer') ?>
<?= $block->getChildHtml('footer') ?>
</div>
<?php endif; ?>
<?php echo $block->getChildHtml('js') ?>
<?= $block->getChildHtml('js') ?>
</div>
32 changes: 16 additions & 16 deletions app/code/Magento/Backend/view/adminhtml/templates/admin/page.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,47 @@
<html lang="<?php /* @escapeNotVerified */ echo $block->getLang() ?>" class="no-js">

<head>
<?php echo $block->getChildHtml('head') ?>
<?= $block->getChildHtml('head') ?>
</head>

<body id="html-body"<?php echo $block->getBodyClass() ? ' class="' . $block->getBodyClass() . '"' : ''; ?> data-container="body" data-mage-init='{"loaderAjax":{},"loader":{}}'>
<body id="html-body"<?= $block->getBodyClass() ? ' class="' . $block->getBodyClass() . '"' : '' ?> data-container="body" data-mage-init='{"loaderAjax":{},"loader":{}}'>
<div class="page-wrapper">
<?php echo $block->getChildHtml('notification_window'); ?>
<?php echo $block->getChildHtml('global_notices') ?>
<?= $block->getChildHtml('notification_window') ?>
<?= $block->getChildHtml('global_notices') ?>
<div class="page-header-wrapper">
<?php echo $block->getChildHtml('header') ?>
<?= $block->getChildHtml('header') ?>
</div>
<?php echo $block->getChildHtml('menu') ?>
<?php echo $block->getChildHtml('notifications'); ?>
<?= $block->getChildHtml('menu') ?>
<?= $block->getChildHtml('notifications') ?>

<main class="page-content" id="anchor-content">
<?php echo $block->getChildHtml('main-top'); ?>
<?= $block->getChildHtml('main-top') ?>
<div class="messages" id="messages" data-container-for="messages">
<?php echo $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
<?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
</div>
<?php echo $block->getChildHtml('page_main_actions'); ?>
<?= $block->getChildHtml('page_main_actions') ?>
<?php if ($block->getChildHtml('left')): ?>
<div id="page:main-container" class="<?php /* @escapeNotVerified */ echo $block->getContainerCssClass() ?> col-2-left-layout">
<div class="main-col" id="content">
<?php echo $block->getChildHtml('content') ?>
<?= $block->getChildHtml('content') ?>
</div>

<div class="side-col" id="page:left">
<?php echo $block->getChildHtml('left') ?>
<?= $block->getChildHtml('left') ?>
</div>
</div>
<?php else: ?>
<div id="page:main-container" class="col-1-layout">
<?php echo $block->getChildHtml('content') ?>
<?= $block->getChildHtml('content') ?>
</div>
<?php endif; ?>
</main>

<?php echo $block->getChildHtml('js') ?>
<?= $block->getChildHtml('js') ?>
<footer class="page-footer">
<?php echo $block->getChildHtml('footer') ?>
<?= $block->getChildHtml('footer') ?>
</footer>
</div>
<?php echo $block->getChildHtml('before_body_end') ?>
<?= $block->getChildHtml('before_body_end') ?>
</body>
</html>
Loading

0 comments on commit 01e9cb4

Please sign in to comment.