diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php index fe01cec33c9c1f51bc3c9ed88703ddcb541f15fa..20c6f974f2c7361aaeb46378b7b1b4f54a20ec97 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Extended.php @@ -203,7 +203,11 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba $this->setChild( 'reset_filter_button', $this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')->setData( - ['label' => __('Reset Filter'), 'onclick' => $this->getJsObjectName() . '.resetFilter()'] + [ + 'label' => __('Reset Filter'), + 'onclick' => $this->getJsObjectName() . '.resetFilter()', + 'class' => 'action-reset' + ] ) ); $this->setChild( diff --git a/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml b/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml index 877bdba39988344d25ddb662787616b68f0ec296..501591a40b015dffa463059e781617e0bbc5e8e7 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml @@ -15,8 +15,8 @@ </div> <div class="clear"></div> <script id="<?php echo $block->getHtmlId() ?>-template" type="text/x-magento-template"> - <div id="<%= data.id %>" class="file-row"> - <span class="file-info"><%= data.name %> (<%= data.size %>)</span> + <div id="<%- data.id %>" class="file-row"> + <span class="file-info"><%- data.name %> (<%- data.size %>)</span> <div class="progressbar-container"> <div class="progressbar upload-progress" style="width: 0%;"></div> </div> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml index b95ad39c1f31d5fd300c737d0be14dcc5a2ce214..15b00d7a88c591da1ebb997ccb58126de599c493 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml @@ -30,11 +30,11 @@ <% if (data.items.length) { %> <% _.each(data.items, function(value){ %> <li class="item" - <%= data.optionData(value) %> + <%- data.optionData(value) %> > - <a href="<%= value.url %>" class="title"><%= value.name %></a> - <span class="type"><%= value.type %></span> - <%= value.description || "" %> + <a href="<%- value.url %>" class="title"><%- value.name %></a> + <span class="type"><%- value.type %></span> + <%- value.description || "" %> </li> <% }); %> <% } else { %> diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php index 9205c9f30b5267d99258e1518b3fdb6b0efa77b9..1c2c1ed85fac6b09e240ecb1e15c52fe67a07507 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php @@ -152,7 +152,7 @@ class Option extends \Magento\Backend\Block\Widget 'add_selection_button', 'Magento\Backend\Block\Widget\Button', [ - 'id' => $this->getFieldId() . '_<%= data.index %>_add_button', + 'id' => $this->getFieldId() . '_<%- data.index %>_add_button', 'label' => __('Add Products to Option'), 'class' => 'add add-selection' ] @@ -162,7 +162,7 @@ class Option extends \Magento\Backend\Block\Widget 'close_search_button', 'Magento\Backend\Block\Widget\Button', [ - 'id' => $this->getFieldId() . '_<%= data.index %>_close_button', + 'id' => $this->getFieldId() . '_<%- data.index %>_close_button', 'label' => __('Close'), 'on_click' => 'bSelection.closeSearch(event)', 'class' => 'back no-display' @@ -272,12 +272,12 @@ class Option extends \Magento\Backend\Block\Widget 'Magento\Framework\View\Element\Html\Select' )->setData( [ - 'id' => $this->getFieldId() . '_<%= data.index %>_type', + 'id' => $this->getFieldId() . '_<%- data.index %>_type', 'class' => 'select select-product-option-type required-option-select', 'extra_params' => 'onchange="bOption.changeType(event)"', ] )->setName( - $this->getFieldName() . '[<%= data.index %>][type]' + $this->getFieldName() . '[<%- data.index %>][type]' )->setOptions( $this->_optionTypes->toOptionArray() ); @@ -293,9 +293,9 @@ class Option extends \Magento\Backend\Block\Widget $select = $this->getLayout()->createBlock( 'Magento\Framework\View\Element\Html\Select' )->setData( - ['id' => $this->getFieldId() . '_<%= data.index %>_required', 'class' => 'select'] + ['id' => $this->getFieldId() . '_<%- data.index %>_required', 'class' => 'select'] )->setName( - $this->getFieldName() . '[<%= data.index %>][required]' + $this->getFieldName() . '[<%- data.index %>][required]' )->setOptions( $this->_yesno->toOptionArray() ); diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php index 596af26f794544249a8c54f06ca95e73c37ed8e5..171d6477ad3c52cc7ee251e88c8aa432eef47a27 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php @@ -131,11 +131,11 @@ class Selection extends \Magento\Backend\Block\Widget 'Magento\Framework\View\Element\Html\Select' )->setData( [ - 'id' => $this->getFieldId() . '_<%= data.index %>_price_type', + 'id' => $this->getFieldId() . '_<%- data.index %>_price_type', 'class' => 'select select-product-option-type required-option-select', ] )->setName( - $this->getFieldName() . '[<%= data.parentIndex %>][<%= data.index %>][selection_price_type]' + $this->getFieldName() . '[<%- data.parentIndex %>][<%- data.index %>][selection_price_type]' )->setOptions( $this->_priceType->toOptionArray() ); @@ -155,9 +155,9 @@ class Selection extends \Magento\Backend\Block\Widget $select = $this->getLayout()->createBlock( 'Magento\Framework\View\Element\Html\Select' )->setData( - ['id' => $this->getFieldId() . '_<%= data.index %>_can_change_qty', 'class' => 'select'] + ['id' => $this->getFieldId() . '_<%- data.index %>_can_change_qty', 'class' => 'select'] )->setName( - $this->getFieldName() . '[<%= data.parentIndex %>][<%= data.index %>][selection_can_change_qty]' + $this->getFieldName() . '[<%- data.parentIndex %>][<%- data.index %>][selection_can_change_qty]' )->setOptions( $this->_yesno->toOptionArray() ); @@ -195,8 +195,8 @@ class Selection extends \Magento\Backend\Block\Widget { $checkboxHtml = ''; if ($this->isUsedWebsitePrice()) { - $fieldsId = $this->getFieldId() . '_<%= data.index %>_price_scope'; - $name = $this->getFieldName() . '[<%= data.parentIndex %>][<%= data.index %>][default_price_scope]'; + $fieldsId = $this->getFieldId() . '_<%- data.index %>_price_scope'; + $name = $this->getFieldName() . '[<%- data.parentIndex %>][<%- data.index %>][default_price_scope]'; $class = 'bundle-option-price-scope-checkbox'; $label = __('Use Default Value'); $disabled = $this->getCanEditPrice() === false ? ' disabled="disabled"' : ''; diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml index 63f88f9a30f27f9747e325a750f5b1857dcbca8a..15746df3554370e6627f82aadbee123660d7c973 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml @@ -9,65 +9,65 @@ /** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option */ ?> <script id="bundle-option-template" type="text/x-magento-template"> - <div id="<?php echo $block->getFieldId() ?>_<%= data.index %>" class="option-box"> - <div class="fieldset-wrapper collapsable-wrapper opened" id="<?php echo $block->getFieldId() ?>_<%= data.index %>-wrapper"> + <div id="<?php echo $block->getFieldId() ?>_<%- data.index %>" class="option-box"> + <div class="fieldset-wrapper collapsable-wrapper opened" id="<?php echo $block->getFieldId() ?>_<%- data.index %>-wrapper"> <div class="fieldset-wrapper-title"> - <strong class="title" data-toggle="collapse" data-target="#<?php echo $block->getFieldId() ?>_<%= data.index %>-content"> - <span><%= data.default_title %></span> + <strong class="title" data-toggle="collapse" data-target="#<?php echo $block->getFieldId() ?>_<%- data.index %>-content"> + <span><%- data.default_title %></span> </strong> <div class="actions"> <?php echo $block->getOptionDeleteButtonHtml() ?> </div> <div data-role="draggable-handle" class="draggable-handle"></div> </div> - <div class="fieldset-wrapper-content in collapse" id="<?php echo $block->getFieldId() ?>_<%= data.index %>-content"> + <div class="fieldset-wrapper-content in collapse" id="<?php echo $block->getFieldId() ?>_<%- data.index %>-content"> <fieldset class="fieldset"> <fieldset class="fieldset-alt"> <div class="field field-option-title required"> - <label class="label" for="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title"> + <label class="label" for="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title"> <?php echo __('Option Title') ?> </label> <div class="control"> <?php if ($block->isDefaultStore()): ?> <input class="input-text required-entry" type="text" - name="<?php echo $block->getFieldName() ?>[<%= data.index %>][title]" - id="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title" - value="<%= data.title %>" - data-original-value="<%= data.title %>" /> + name="<?php echo $block->getFieldName() ?>[<%- data.index %>][title]" + id="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title" + value="<%- data.title %>" + data-original-value="<%- data.title %>" /> <?php else: ?> <input class="input-text required-entry" type="text" - name="<?php echo $block->getFieldName() ?>[<%= data.index %>][default_title]" - id="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_default_title" - value="<%= data.default_title %>" - data-original-value="<%= data.default_title %>" /> + name="<?php echo $block->getFieldName() ?>[<%- data.index %>][default_title]" + id="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_default_title" + value="<%- data.default_title %>" + data-original-value="<%- data.default_title %>" /> <?php endif; ?> <input type="hidden" - id="<?php echo $block->getFieldId() ?>_id_<%= data.index %>" - name="<?php echo $block->getFieldName() ?>[<%= data.index %>][option_id]" - value="<%= data.option_id %>" /> + id="<?php echo $block->getFieldId() ?>_id_<%- data.index %>" + name="<?php echo $block->getFieldName() ?>[<%- data.index %>][option_id]" + value="<%- data.option_id %>" /> <input type="hidden" - name="<?php echo $block->getFieldName() ?>[<%= data.index %>][delete]" + name="<?php echo $block->getFieldName() ?>[<%- data.index %>][delete]" value="" data-state="deleted" /> </div> </div> <?php if (!$block->isDefaultStore()): ?> <div class="field field-option-store-view required"> - <label class="label" for="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title_store"> + <label class="label" for="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title_store"> <?php echo __('Store View Title') ?> </label> <div class="control"> <input class="input-text required-entry" type="text" - name="<?php echo $block->getFieldName() ?>[<%= data.index %>][title]" - id="id_<?php echo $block->getFieldName() ?>_<%= data.index %>_title_store" - value="<%= data.title %>" /> + name="<?php echo $block->getFieldName() ?>[<%- data.index %>][title]" + id="id_<?php echo $block->getFieldName() ?>_<%- data.index %>_title_store" + value="<%- data.title %>" /> </div> </div> <?php endif; ?> <div class="field field-option-input-type required"> - <label class="label" for="<?php echo $block->getFieldId() . '_<%= data.index %>_type' ?>"> + <label class="label" for="<?php echo $block->getFieldId() . '_<%- data.index %>_type' ?>"> <?php echo __('Input Type') ?> </label> <div class="control"> @@ -93,8 +93,8 @@ <div class="control"> <input class="input-text validate-zero-or-greater" type="text" - name="<?php echo $block->getFieldName() ?>[<%= data.index %>][position]" - value="<%= data.position %>" + name="<?php echo $block->getFieldName() ?>[<%- data.index %>][position]" + value="<%- data.position %>" id="field-option-position" /> </div> </div> @@ -107,7 +107,7 @@ </fieldset> </div> </div> - <div id="<?php echo $block->getFieldId() ?>_search_<%= data.index %>" class="selection-search"></div> + <div id="<?php echo $block->getFieldId() ?>_search_<%- data.index %>" class="selection-search"></div> </div> </script> diff --git a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml index 980c542278c6329e9b4a0acdebe76048418c8c13..1fb154b2a48b96020551b20280a8fb7516363c82 100644 --- a/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml +++ b/app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml @@ -33,30 +33,30 @@ <script id="bundle-option-selection-row-template" type="text/x-magento-template"> <td class="col-draggable"> <span data-role="draggable-handle" class="draggable-handle"></span> - <input type="hidden" id="<?php echo $block->getFieldId() ?>_id<%= data.index %>" - name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][selection_id]" - value="<%= data.selection_id %>"/> - <input type="hidden" name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][option_id]" - value="<%= data.option_id %>"/> + <input type="hidden" id="<?php echo $block->getFieldId() ?>_id<%- data.index %>" + name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][selection_id]" + value="<%- data.selection_id %>"/> + <input type="hidden" name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][option_id]" + value="<%- data.option_id %>"/> <input type="hidden" class="product" - name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][product_id]" - value="<%= data.product_id %>"/> - <input type="hidden" name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][delete]" + name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][product_id]" + value="<%- data.product_id %>"/> + <input type="hidden" name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][delete]" value="" class="delete"/> </td> <td class="col-default"> - <input onclick="bSelection.checkGroup(event)" type="<%= data.option_type %>" class="default" - name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][is_default]" - value="1" <%= data.checked %> /> + <input onclick="bSelection.checkGroup(event)" type="<%- data.option_type %>" class="default" + name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][is_default]" + value="1" <%- data.checked %> /> </td> - <td class="col-name"><%= data.name %></td> - <td class="col-sku"><%= data.sku %></td> + <td class="col-name"><%- data.name %></td> + <td class="col-sku"><%- data.sku %></td> <?php if ($block->getCanReadPrice() !== false): ?> <td class="col-price price-type-box"> - <input id="<?php echo $block->getFieldId() ?>_<%= data.index %>_price_value" + <input id="<?php echo $block->getFieldId() ?>_<%- data.index %>_price_value" class="input-text required-entry validate-zero-or-greater" type="text" - name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][selection_price_value]" - value="<%= data.selection_price_value %>" + name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_value]" + value="<%- data.selection_price_value %>" <?php if ($block->getCanEditPrice() === false): ?> disabled="disabled" <?php endif; ?>/> @@ -66,19 +66,19 @@ <div><?php echo $block->getCheckboxScopeHtml() ?></div> </td> <?php else: ?> - <input type="hidden" id="<?php echo $block->getFieldId(); ?>_<%= data.index %>_price_value" - name="<?php echo $block->getFieldName(); ?>[<%= data.parentIndex %>][<%= data.index %>][selection_price_value]" value="0" /> - <input type="hidden" id="<?php echo $block->getFieldId(); ?>_<%= data.index %>_price_type" - name="<?php echo $block->getFieldName(); ?>[<%= data.parentIndex %>][<%= data.index %>][selection_price_type]" value="0" /> + <input type="hidden" id="<?php echo $block->getFieldId(); ?>_<%- data.index %>_price_value" + name="<?php echo $block->getFieldName(); ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_value]" value="0" /> + <input type="hidden" id="<?php echo $block->getFieldId(); ?>_<%- data.index %>_price_type" + name="<?php echo $block->getFieldName(); ?>[<%- data.parentIndex %>][<%- data.index %>][selection_price_type]" value="0" /> <?php if ($block->isUsedWebsitePrice()): ?> - <input type="hidden" id="<?php echo $block->getFieldId(); ?>_<%= data.index %>_price_scope" - name="<?php echo $block->getFieldName(); ?>[<%= data.parentIndex %>][<%= data.index %>][default_price_scope]" value="1" /> + <input type="hidden" id="<?php echo $block->getFieldId(); ?>_<%- data.index %>_price_scope" + name="<?php echo $block->getFieldName(); ?>[<%- data.parentIndex %>][<%- data.index %>][default_price_scope]" value="1" /> <?php endif; ?> <?php endif; ?> <td class="col-qty"> <input class="input-text required-entry validate-greater-zero-based-on-option validate-zero-or-greater" type="text" - name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][selection_qty]" - value="<%= data.selection_qty %>" /> + name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][selection_qty]" + value="<%- data.selection_qty %>" /> </td> <td class="col-uqty qty-box"> <input type="checkbox" class="is-user-defined-qty" checked="checked" /> @@ -86,8 +86,8 @@ </td> <td class="col-order type-order" style="display:none"> <input class="input-text required-entry validate-zero-or-greater" type="text" - name="<?php echo $block->getFieldName() ?>[<%= data.parentIndex %>][<%= data.index %>][position]" - value="<%= data.position %>" /> + name="<?php echo $block->getFieldName() ?>[<%- data.parentIndex %>][<%- data.index %>][position]" + value="<%- data.position %>" /> </td> <td class="col-actions"> <span title="Delete Row"> @@ -118,9 +118,9 @@ Bundle.Selection.prototype = { selectionSearchUrl: '<?php echo $block->getSelectionSearchUrl() ?>', initialize : function() { - this.templateBox = '<div class="tier form-list" id="' + this.idLabel + '_box_<%= data.parentIndex %>">' + bundleTemplateBox + '</div>'; + this.templateBox = '<div class="tier form-list" id="' + this.idLabel + '_box_<%- data.parentIndex %>">' + bundleTemplateBox + '</div>'; - this.templateRow = '<tr class="selection" id="' + this.idLabel + '_row_<%= data.index %>">' + bundleTemplateRow + '</tr>'; + this.templateRow = '<tr class="selection" id="' + this.idLabel + '_row_<%- data.index %>">' + bundleTemplateRow + '</tr>'; }, gridUpdateCallback: function () { diff --git a/app/code/Magento/Bundle/view/base/web/js/price-bundle.js b/app/code/Magento/Bundle/view/base/web/js/price-bundle.js index 3ddaa575917b9d656f7f420c6cc8c1ee1d5ccbe6..3ad6f45b08d40194c9515e3769daf1936de8224c 100644 --- a/app/code/Magento/Bundle/view/base/web/js/price-bundle.js +++ b/app/code/Magento/Bundle/view/base/web/js/price-bundle.js @@ -17,9 +17,9 @@ define([ qtyFieldSelector: 'input.qty', priceBoxSelector: '.price-box', optionHandlers: {}, - optionTemplate: '<%= label %>' + + optionTemplate: '<%- label %>' + '<% if (finalPrice.value) { %>' + - ' +<%= finalPrice.formatted %>' + + ' +<%- finalPrice.formatted %>' + '<% } %>', controlContainer: 'dd', // should be eliminated priceFormat: {} diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml index e1d0399f1c6ae86bf454b0dc748af3abab573262..a1439de033d8f2d99c36e968b87f8723e6d7b2b2 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml @@ -41,32 +41,31 @@ <ul data-mage-init='{"productSummary": []}' class="bundle items"></ul> <script data-template="bundle-summary" type="text/x-magento-template"> <li> - <strong class="label"><%= data._label_ %>:</strong> + <strong class="label"><%- data._label_ %>:</strong> <div data-container="options"></div> </li> </script> <script data-template="bundle-option" type="text/x-magento-template"> - <div><?php echo __('%1 x %2', '<%= data._quantity_ %>', '<%= data._label_ %>') ?></div> + <div><?php echo __('%1 x %2', '<%- data._quantity_ %>', '<%- data._label_ %>') ?></div> </script> </div> </div> </div> </div> -<script> - require([ - "jquery", - "mage/mage" - ], function($){ - $('.product-add-form').mage('slide', { - 'slideSpeed': 1500, - 'slideSelector': '#bundle-slide', - 'slideBackSelector': '.action.customization.back', - 'bundleProductSelector': '#bundleProduct', - 'bundleOptionsContainer': '.product-add-form', - <?php if ($block->isStartCustomization()): ?> - 'autostart': true - <?php endif;?> - }); - }); +<script type="text/x-magento-init"> + { + ".product-add-form": { + "slide": { + "slideSpeed": 1500, + "slideSelector": "#bundle-slide", + "slideBackSelector": ".action.customization.back", + "bundleProductSelector": "#bundleProduct", + "bundleOptionsContainer": ".product-add-form" + <?php if ($block->isStartCustomization()): ?> + ,"autostart": true + <?php endif;?> + } + } + } </script> <?php endif; ?> diff --git a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml index bf0993ce8ca8a2d5625d9ce6214f0137f1447a4d..278c7d501f22dd242e48f4c52eab73082321b236 100644 --- a/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml +++ b/app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/options.phtml @@ -15,19 +15,15 @@ $helper = $this->helper('Magento\Catalog\Helper\Output'); <?php $options = $block->decorateArray($block->getOptions()); ?> <?php if ($product->isSaleable()):?> <?php if (count($options)): ?> -<script> -require([ - 'jquery', - 'mage/mage', - 'Magento_Bundle/js/price-bundle' -], function($){ - $(function() { - $('#product_addtocart_form').priceBundle({ - optionConfig:<?php echo $block->getJsonConfig()?>, - controlContainer: '.field.option' - }); - }); -}); +<script type="text/x-magento-init"> + { + "#product_addtocart_form": { + "priceBundle": { + "optionConfig": <?php echo $block->getJsonConfig()?>, + "controlContainer": ".field.option" + } + } + } </script> <fieldset class="fieldset bundle options"> <legend id="customizeTitle" class="legend title"> diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php index 484472fd3bbafa7f1086319146cc7ec3b8559ab3..088cc75846d5e136cba16d11f81dbb2889bda6cd 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Option.php @@ -209,11 +209,11 @@ class Option extends Widget 'Magento\Framework\View\Element\Html\Select' )->setData( [ - 'id' => $this->getFieldId() . '_<%= data.id %>_type', + 'id' => $this->getFieldId() . '_<%- data.id %>_type', 'class' => 'select select-product-option-type required-option-select', ] )->setName( - $this->getFieldName() . '[<%= data.id %>][type]' + $this->getFieldName() . '[<%- data.id %>][type]' )->setOptions( $this->_optionType->toOptionArray() ); @@ -229,9 +229,9 @@ class Option extends Widget $select = $this->getLayout()->createBlock( 'Magento\Framework\View\Element\Html\Select' )->setData( - ['id' => $this->getFieldId() . '_<%= data.id %>_is_require', 'class' => 'select'] + ['id' => $this->getFieldId() . '_<%- data.id %>_is_require', 'class' => 'select'] )->setName( - $this->getFieldName() . '[<%= data.id %>][is_require]' + $this->getFieldName() . '[<%- data.id %>][is_require]' )->setOptions( $this->_configYesNo->toOptionArray() ); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php index 95a350a34581ce626025e9fff6b5a55e4800eeef..b4c8d96bbdc11a4d47cafb77d8121a9c46d40e52 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/AbstractType.php @@ -50,7 +50,7 @@ class AbstractType extends \Magento\Backend\Block\Widget $this->getNameInLayout() )->setData( [ - 'id' => 'product_option_<%= data.option_id %>_price_type', + 'id' => 'product_option_<%- data.option_id %>_price_type', 'class' => 'select product-option-price-type', ] ) @@ -59,7 +59,7 @@ class AbstractType extends \Magento\Backend\Block\Widget $this->getChildBlock( 'option_price_type' )->setName( - 'product[options][<%= data.option_id %>][price_type]' + 'product[options][<%- data.option_id %>][price_type]' )->setOptions( $this->_optionPrice->toOptionArray() ); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php index f8c00955c853765aded7e6d014b07235688981ef..c91c09dcb9f15fe552930a1bd7a4e03bd3350deb 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/Select.php @@ -42,7 +42,7 @@ class Select extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\T [ 'label' => __('Add New Row'), 'class' => 'add add-select-row', - 'id' => 'product_option_<%= data.option_id %>_add_select_row' + 'id' => 'product_option_<%- data.option_id %>_add_select_row' ] ); @@ -52,7 +52,7 @@ class Select extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\T [ 'label' => __('Delete Row'), 'class' => 'delete delete-select-row icon-btn', - 'id' => 'product_option_<%= data.id %>_select_<%= data.select_id %>_delete' + 'id' => 'product_option_<%- data.id %>_select_<%- data.select_id %>_delete' ] ); @@ -87,9 +87,9 @@ class Select extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\T 'option_price_type' )->setData( 'id', - 'product_option_<%= data.id %>_select_<%= data.select_id %>_price_type' + 'product_option_<%- data.id %>_select_<%- data.select_id %>_price_type' )->setName( - 'product[options][<%= data.id %>][values][<%= data.select_id %>][price_type]' + 'product[options][<%- data.id %>][values][<%- data.select_id %>][price_type]' )->setExtraParams($extraParams); return parent::getPriceTypeSelectHtml(); diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php index 31d3710ebdf2efc9df5285219fd7284e6d7fd7b5..e38a5d08f8915b29c03e0c3a72671669495a7d24 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Helper/Form/BaseImage.php @@ -105,9 +105,9 @@ class BaseImage extends \Magento\Framework\Data\Form\Element\AbstractElement <img class="spacer" src="{$spacerImage}"/> <img class="product-image" - src="<%= data.url %>" - data-position="<%= data.position %>" - alt="<%= data.label %>" /> + src="<%- data.url %>" + data-position="<%- data.position %>" + alt="<%- data.label %>" /> <div class="actions"> <button type="button" class="action-delete" data-role="delete-button" title="{$deleteImageText}"> <span>{$deleteImageText}</span> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml index a85267c7e753797a8f3c18bf3b95069b63c5df3f..0d0cbb27f2ec51e2a2812d602685b6584b348481 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml @@ -47,16 +47,16 @@ <?php if (!$block->getReadOnly() && !$block->canManageOptionDefaultOnly()): ?> <div data-role="draggable-handle" class="draggable-handle" title="<?php echo __('Sort Option'); ?>"></div> <?php endif; ?> - <input data-role="order" type="hidden" name="option[order][<%= data.id %>]" value="<%= data.sort_order %>" <?php if ($block->getReadOnly() || $block->canManageOptionDefaultOnly()): ?> disabled="disabled"<?php endif; ?>/> + <input data-role="order" type="hidden" name="option[order][<%- data.id %>]" value="<%- data.sort_order %>" <?php if ($block->getReadOnly() || $block->canManageOptionDefaultOnly()): ?> disabled="disabled"<?php endif; ?>/> </td> <td class="col-default"> - <input class="input-radio" type="<%= data.intype %>" name="default[]" value="<%= data.id %>" <%= data.checked %><?php if ($block->getReadOnly()):?>disabled="disabled"<?php endif;?>/> + <input class="input-radio" type="<%- data.intype %>" name="default[]" value="<%- data.id %>" <%- data.checked %><?php if ($block->getReadOnly()):?>disabled="disabled"<?php endif;?>/> </td> <?php foreach ($block->getStores() as $_store): ?> - <td class="col-<%= data.id %>"><input name="option[value][<%= data.id %>][<?php echo $_store->getId() ?>]" value="<%= data.store<?php echo $_store->getId() ?> %>" class="input-text<?php if ($_store->getId() == \Magento\Store\Model\Store::DEFAULT_STORE_ID): ?> required-option<?php endif; ?>" type="text" <?php if ($block->getReadOnly() || $block->canManageOptionDefaultOnly()):?> disabled="disabled"<?php endif;?>/></td> + <td class="col-<%- data.id %>"><input name="option[value][<%- data.id %>][<?php echo $_store->getId() ?>]" value="<%- data.store<?php echo $_store->getId() ?> %>" class="input-text<?php if ($_store->getId() == \Magento\Store\Model\Store::DEFAULT_STORE_ID): ?> required-option<?php endif; ?>" type="text" <?php if ($block->getReadOnly() || $block->canManageOptionDefaultOnly()):?> disabled="disabled"<?php endif;?>/></td> <?php endforeach; ?> - <td id="delete_button_container_<%= data.id %>" class="col-delete"> - <input type="hidden" class="delete-flag" name="option[delete][<%= data.id %>]" value="" /> + <td id="delete_button_container_<%- data.id %>" class="col-delete"> + <input type="hidden" class="delete-flag" name="option[delete][<%- data.id %>]" value="" /> <?php if (!$block->getReadOnly() && !$block->canManageOptionDefaultOnly()):?> <button title="<?php echo __('Delete') ?>" type="button" class="action- scalable delete delete-option" diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml index 58fa60e3ab5950a75187b8d71f39001ccacd937d..8ecc1010f041eb2608ff46013923ceef369047ff 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/attribute_set.phtml @@ -14,7 +14,7 @@ <% } %> <ul data-mage-init='{"menu":[]}'> <% _.each(data.items, function(value) { %> - <li <%= data.optionData(value) %>><a href="#"><%= value.label %></a></li> + <li <%- data.optionData(value) %>><a href="#"><%- value.label %></a></li> <% }); %> </ul> <% if (!data.term && data.items.length && !data.allShown()) { %> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml index 4dbb26fbc2eac4272a84f5d2fd7471a09f7273ab..f6a4d3c30b2dd276c9521bdd6f4bd0dd1186f2d4 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/option.phtml @@ -10,48 +10,48 @@ <?php /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Option */ ?> <?php echo $block->getTemplatesHtml() ?> <script id="custom-option-base-template" type="text/x-magento-template"> - <div class="fieldset-wrapper collapsable-wrapper opened" id="option_<%= data.id %>"> + <div class="fieldset-wrapper collapsable-wrapper opened" id="option_<%- data.id %>"> <div class="fieldset-wrapper-title"> - <strong class="title" data-toggle="collapse" data-target="#<%= data.id %>-content"> - <span id="option_<%= data.id %>_header_title"><%= data.title %></span> + <strong class="title" data-toggle="collapse" data-target="#<%- data.id %>-content"> + <span id="option_<%- data.id %>_header_title"><%- data.title %></span> </strong> <div class="actions"> - <button type="button" title="<?php echo __('Delete Custom Option'); ?>" class="action-delete" id="<?php echo $block->getFieldId() ?>_<%= data.id %>_delete"> + <button type="button" title="<?php echo __('Delete Custom Option'); ?>" class="action-delete" id="<?php echo $block->getFieldId() ?>_<%- data.id %>_delete"> <span><?php echo __('Delete Custom Option'); ?></span> </button> </div> - <div id="<?php echo $block->getFieldId() ?>_<%= data.id %>_move" data-role="draggable-handle" class="draggable-handle" + <div id="<?php echo $block->getFieldId() ?>_<%- data.id %>_move" data-role="draggable-handle" class="draggable-handle" title="<?php echo __('Sort Custom Options'); ?>"></div> </div> - <div class="fieldset-wrapper-content in collapse" id="<%= data.id %>-content"> + <div class="fieldset-wrapper-content in collapse" id="<%- data.id %>-content"> <fieldset class="fieldset"> - <fieldset class="fieldset-alt" id="<?php echo $block->getFieldId() ?>_<%= data.id %>"> - <input id="<?php echo $block->getFieldId() ?>_<%= data.id %>_is_delete" name="<?php echo $block->getFieldName() ?>[<%= data.id %>][is_delete]" type="hidden" value=""/> - <input id="<?php echo $block->getFieldId() ?>_<%= data.id %>_previous_type" name="<?php echo $block->getFieldName() ?>[<%= data.id %>][previous_type]" type="hidden" value="<%= data.type %>"/> - <input id="<?php echo $block->getFieldId() ?>_<%= data.id %>_previous_group" name="<?php echo $block->getFieldName() ?>[<%= data.id %>][previous_group]" type="hidden" value=""/> - <input id="<?php echo $block->getFieldId() ?>_<%= data.id %>_id" name="<?php echo $block->getFieldName() ?>[<%= data.id %>][id]" type="hidden" value="<%= data.id %>"/> - <input id="<?php echo $block->getFieldId() ?>_<%= data.id %>_option_id" name="<?php echo $block->getFieldName() ?>[<%= data.id %>][option_id]" type="hidden" value="<%= data.option_id %>"/> - <input name="<?php echo $block->getFieldName() ?>[<%= data.id %>][sort_order]" type="hidden" value="<%= data.sort_order %>"/> + <fieldset class="fieldset-alt" id="<?php echo $block->getFieldId() ?>_<%- data.id %>"> + <input id="<?php echo $block->getFieldId() ?>_<%- data.id %>_is_delete" name="<?php echo $block->getFieldName() ?>[<%- data.id %>][is_delete]" type="hidden" value=""/> + <input id="<?php echo $block->getFieldId() ?>_<%- data.id %>_previous_type" name="<?php echo $block->getFieldName() ?>[<%- data.id %>][previous_type]" type="hidden" value="<%- data.type %>"/> + <input id="<?php echo $block->getFieldId() ?>_<%- data.id %>_previous_group" name="<?php echo $block->getFieldName() ?>[<%- data.id %>][previous_group]" type="hidden" value=""/> + <input id="<?php echo $block->getFieldId() ?>_<%- data.id %>_id" name="<?php echo $block->getFieldName() ?>[<%- data.id %>][id]" type="hidden" value="<%- data.id %>"/> + <input id="<?php echo $block->getFieldId() ?>_<%- data.id %>_option_id" name="<?php echo $block->getFieldName() ?>[<%- data.id %>][option_id]" type="hidden" value="<%- data.option_id %>"/> + <input name="<?php echo $block->getFieldName() ?>[<%- data.id %>][sort_order]" type="hidden" value="<%- data.sort_order %>"/> <div class="field field-option-title required"> - <label class="label" for="<?php echo $block->getFieldId() ?>_<%= data.id %>_title"> + <label class="label" for="<?php echo $block->getFieldId() ?>_<%- data.id %>_title"> <?php echo __('Option Title') ?> </label> <div class="control"> - <input id="<?php echo $block->getFieldId() ?>_<%= data.id %>_title" - name="<?php echo $block->getFieldName() ?>[<%= data.id %>][title]" + <input id="<?php echo $block->getFieldId() ?>_<%- data.id %>_title" + name="<?php echo $block->getFieldName() ?>[<%- data.id %>][title]" class="required-entry input-text" type="text" - value="<%= data.title %>" - data-store-label="<%= data.title %>" + value="<%- data.title %>" + data-store-label="<%- data.title %>" <% if (typeof data.scopeTitleDisabled != 'undefined' && data.scopeTitleDisabled != null) { %> disabled="disabled" <% } %> > - <%= data.checkboxScopeTitle %> + <%- data.checkboxScopeTitle %> </div> </div> <div class="field field-option-input-type required"> - <label class="label" for="<?php echo $block->getFieldId() ?>_<%= data.id %>_title"> + <label class="label" for="<?php echo $block->getFieldId() ?>_<%- data.id %>_title"> <?php echo __('Input Type') ?> </label> <div class="control opt-type"> @@ -61,7 +61,7 @@ <div class="field field-option-req"> <div class="control"> - <input id="<?php echo $block->getFieldId() ?>_<%= data.id %>_required" class="is-required" type="checkbox" checked="checked"/> + <input id="<?php echo $block->getFieldId() ?>_<%- data.id %>_required" class="is-required" type="checkbox" checked="checked"/> <label for="field-option-req"> <?php echo __('Required')?> </label> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml index dd7a8f4f0473dc958b53f0553b8788757b134aa2..106b6408c30350b931ac18c90c2474a59126b955 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/date.phtml @@ -9,7 +9,7 @@ ?> <?php /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Date */ ?> <script id="custom-option-date-type-template" type="text/x-magento-template"> - <div id="product_option_<%= data.option_id %>_type_<%= data.group %>" class="fieldset"> + <div id="product_option_<%- data.option_id %>_type_<%- data.group %>" class="fieldset"> <table class="data-table" cellspacing="0"> <thead> <tr class="headings"> @@ -23,21 +23,21 @@ <tr> <?php if ($block->getCanReadPrice() !== false) : ?> <td class="opt-price"> - <input id="product_option_<%= data.option_id %>_price" - name="product[options][<%= data.option_id %>][price]" + <input id="product_option_<%- data.option_id %>_price" + name="product[options][<%- data.option_id %>][price]" class="input-text validate-number product-option-price" - type="text" value="<%= data.price %>" data-store-label="<%= data.price %>" + type="text" value="<%- data.price %>" data-store-label="<%- data.price %>" <?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>> </td> - <td class="opt-price-type"><?php echo $block->getPriceTypeSelectHtml() ?><%= data.checkboxScopePrice %></td> + <td class="opt-price-type"><?php echo $block->getPriceTypeSelectHtml() ?><%- data.checkboxScopePrice %></td> <?php else : ?> - <input id="product_option_<%= data.option_id %>_price" name="product[options][<%= data.option_id %>][price]" type="hidden"> - <input id="product_option_<%= data.option_id %>_price_type" name="product[options][<%= data.option_id %>][price_type]" type="hidden"> + <input id="product_option_<%- data.option_id %>_price" name="product[options][<%- data.option_id %>][price]" type="hidden"> + <input id="product_option_<%- data.option_id %>_price_type" name="product[options][<%- data.option_id %>][price_type]" type="hidden"> <?php endif; ?> <td> - <input name="product[options][<%= data.option_id %>][sku]" class="input-text type-sku" value="<%= data.sku %>" type="text"> + <input name="product[options][<%- data.option_id %>][sku]" class="input-text type-sku" value="<%- data.sku %>" type="text"> </td> </tr> </table> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml index 5d2c7439476620eccff0aebf049a953c254c6351..0d0b729876da816ed00bf224d2c1b94068bc3725 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/file.phtml @@ -9,7 +9,7 @@ ?> <?php /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\File */ ?> <script id="custom-option-file-type-template" type="text/x-magento-template"> - <div id="product_option_<%= data.option_id %>_type_<%= data.group %>" class="fieldset"> + <div id="product_option_<%- data.option_id %>_type_<%- data.group %>" class="fieldset"> <table class="data-table" cellspacing="0"> <thead> <tr> @@ -25,26 +25,26 @@ <tr> <?php if ($block->getCanReadPrice() !== false) : ?> <td class="opt-price"> - <input name="product[options][<%= data.option_id %>][price]" data-store-label="<%= data.price %>" - class="input-text validate-zero-or-greater" type="text" value="<%= data.price %>" + <input name="product[options][<%- data.option_id %>][price]" data-store-label="<%- data.price %>" + class="input-text validate-zero-or-greater" type="text" value="<%- data.price %>" <?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>> </td> - <td class="opt-price-type"><?php echo $block->getPriceTypeSelectHtml() ?><%= data.checkboxScopePrice %></td> + <td class="opt-price-type"><?php echo $block->getPriceTypeSelectHtml() ?><%- data.checkboxScopePrice %></td> <?php else : ?> - <input name="product[options][<%= data.option_id %>][price]" type="hidden"> - <input id="product_option_<%= data.option_id %>_price_type" name="product[options][<%= data.option_id %>][price_type]" type="hidden"> + <input name="product[options][<%- data.option_id %>][price]" type="hidden"> + <input id="product_option_<%- data.option_id %>_price_type" name="product[options][<%- data.option_id %>][price_type]" type="hidden"> <?php endif; ?> <td> - <input name="product[options][<%= data.option_id %>][sku]" class="input-text" type="text" value="<%= data.sku %>"> + <input name="product[options][<%- data.option_id %>][sku]" class="input-text" type="text" value="<%- data.sku %>"> </td> <td> - <input name="product[options][<%= data.option_id %>][file_extension]" class="input-text" type="text" value="<%= data.file_extension %>"> + <input name="product[options][<%- data.option_id %>][file_extension]" class="input-text" type="text" value="<%- data.file_extension %>"> </td> <td class="col-file"><?php echo __('%1 <span>x</span> %2 <span>px.</span>', - '<input class="input-text" type="text" name="product[options][<%= data.option_id %>][image_size_x]" value="<%= data.image_size_x %>">', - '<input class="input-text" type="text" name="product[options][<%= data.option_id %>][image_size_y]" value="<%= data.image_size_y %>">') ?> + '<input class="input-text" type="text" name="product[options][<%- data.option_id %>][image_size_x]" value="<%- data.image_size_x %>">', + '<input class="input-text" type="text" name="product[options][<%- data.option_id %>][image_size_y]" value="<%- data.image_size_y %>">') ?> <div class="note"><?php echo __('Please leave blank if it is not an image.') ?></div> </td> </tr> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml index 3be1623371d4da3bf854b53e781805da12c9618c..06552fa3a7e4d2e63aa92e1d4453638a4201cc66 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/select.phtml @@ -9,7 +9,7 @@ ?> <?php /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Select */ ?> <script id="custom-option-select-type-template" type="text/x-magento-template"> - <div id="product_option_<%= data.option_id %>_type_<%= data.group %>" class="fieldset"> + <div id="product_option_<%- data.option_id %>_type_<%- data.group %>" class="fieldset"> <table class="data-table"> <thead> <tr> @@ -23,11 +23,11 @@ <th class="col-actions"> </th> </tr> </thead> - <tbody id="select_option_type_row_<%= data.option_id %>"></tbody> + <tbody id="select_option_type_row_<%- data.option_id %>"></tbody> <tfoot> <tr> <td colspan="6"><?php echo $block->getAddButtonHtml() ?> - <input name="validation_<%= data.option_id %>_result" class="required-option-select-type-rows" type="hidden" value=""> + <input name="validation_<%- data.option_id %>_result" class="required-option-select-type-rows" type="hidden" value=""> </td> </tr> </tfoot> @@ -35,35 +35,35 @@ </div> </script> <script id="custom-option-select-type-row-template" type="text/x-magento-template"> - <tr id="product_option_<%= data.id %>_select_<%= data.select_id %>"> + <tr id="product_option_<%- data.id %>_select_<%- data.select_id %>"> <td class="col-draggable"> <div data-role="draggable-handle" class="draggable-handle" title="<?php echo __('Sort Custom Option'); ?>"></div> - <input name="product[options][<%= data.id %>][values][<%= data.select_id %>][sort_order]" type="hidden" value="<%= data.sort_order %>"> + <input name="product[options][<%- data.id %>][values][<%- data.select_id %>][sort_order]" type="hidden" value="<%- data.sort_order %>"> </td> <td class="col-name select-opt-title"> - <input name="product[options][<%= data.id %>][values][<%= data.select_id %>][option_type_id]" type="hidden" value="<%= data.option_type_id %>"> - <input id="product_option_<%= data.id %>_select_<%= data.select_id %>_is_delete" name="product[options][<%= data.id %>][values][<%= data.select_id %>][is_delete]" type="hidden" value=""> - <input id="product_option_<%= data.id %>_select_<%= data.select_id %>_title" <% if (typeof data.scopeTitleDisabled != 'undefined' && data.scopeTitleDisabled != null) { %> disabled="disabled" <% } %> name="product[options][<%= data.id %>][values][<%= data.select_id %>][title]" class="required-entry input-text select-type-title <% if (typeof data.scopeTitleDisabled != 'undefined' && data.scopeTitleDisabled != null) { %> disabled <% } %>" type="text" value="<%= data.title %>" data-store-label="<%= data.title %>"><%= data.checkboxScopeTitle %> + <input name="product[options][<%- data.id %>][values][<%- data.select_id %>][option_type_id]" type="hidden" value="<%- data.option_type_id %>"> + <input id="product_option_<%- data.id %>_select_<%- data.select_id %>_is_delete" name="product[options][<%- data.id %>][values][<%- data.select_id %>][is_delete]" type="hidden" value=""> + <input id="product_option_<%- data.id %>_select_<%- data.select_id %>_title" <% if (typeof data.scopeTitleDisabled != 'undefined' && data.scopeTitleDisabled != null) { %> disabled="disabled" <% } %> name="product[options][<%- data.id %>][values][<%- data.select_id %>][title]" class="required-entry input-text select-type-title <% if (typeof data.scopeTitleDisabled != 'undefined' && data.scopeTitleDisabled != null) { %> disabled <% } %>" type="text" value="<%- data.title %>" data-store-label="<%- data.title %>"><%- data.checkboxScopeTitle %> </td> <?php if ($block->getCanReadPrice() !== false) : ?> <td class="col-price select-opt-price"> - <input id="product_option_<%= data.id %>_select_<%= data.select_id %>_price" + <input id="product_option_<%- data.id %>_select_<%- data.select_id %>_price" <% if (typeof data.scopePriceDisabled != 'undefined' && data.scopePriceDisabled != null) { %> disabled="disabled" <% } %> - name="product[options][<%= data.id %>][values][<%= data.select_id %>][price]" + name="product[options][<%- data.id %>][values][<%- data.select_id %>][price]" class="input-text validate-number product-option-price" - type="text" value="<%= data.price %>" data-store-label="<%= data.price %>" + type="text" value="<%- data.price %>" data-store-label="<%- data.price %>" <?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>> </td> - <td class="col-price-type select-opt-price-type"><?php echo $block->getPriceTypeSelectHtml('<% if (typeof data.scopePriceDisabled != "undefined" && data.scopePriceDisabled != null) { %> disabled="disabled" <% } %>') ?><%= data.checkboxScopePrice %></td> + <td class="col-price-type select-opt-price-type"><?php echo $block->getPriceTypeSelectHtml('<% if (typeof data.scopePriceDisabled != "undefined" && data.scopePriceDisabled != null) { %> disabled="disabled" <% } %>') ?><%- data.checkboxScopePrice %></td> <?php else : ?> - <input id="product_option_<%= data.id %>_select_<%= data.select_id %>_price" name="product[options][<%= data.id %>][values][<%= data.select_id %>][price]" type="hidden"> - <input id="product_option_<%= data.id %>_select_<%= data.select_id %>_price_type" name="product[options][<%= data.id %>][values][<%= data.select_id %>][price_type]" type="hidden"> + <input id="product_option_<%- data.id %>_select_<%- data.select_id %>_price" name="product[options][<%- data.id %>][values][<%- data.select_id %>][price]" type="hidden"> + <input id="product_option_<%- data.id %>_select_<%- data.select_id %>_price_type" name="product[options][<%- data.id %>][values][<%- data.select_id %>][price_type]" type="hidden"> <?php endif; ?> <td class="col-sku"> - <input name="product[options][<%= data.id %>][values][<%= data.select_id %>][sku]" class="input-text" type="text" value="<%= data.sku %>"> + <input name="product[options][<%- data.id %>][values][<%- data.select_id %>][sku]" class="input-text" type="text" value="<%- data.sku %>"> </td> <td class="col-actions col-delete"> <?php echo $block->getDeleteButtonHtml() ?></td> </tr> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml index b9a5de10d1041b05748c5b614f7218561e951815..9ec2900c974880f8347bb8ee65f087ba446aa94a 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/options/type/text.phtml @@ -9,7 +9,7 @@ ?> <?php /** @var $block \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Text */ ?> <script id="custom-option-text-type-template" type="text/x-magento-template"> - <div id="product_option_<%= data.option_id %>_type_<%= data.group %>" class="fieldset"> + <div id="product_option_<%- data.option_id %>_type_<%- data.group %>" class="fieldset"> <table class="data-table" cellspacing="0"> <thead> <tr> @@ -24,24 +24,24 @@ <tr> <?php if ($block->getCanReadPrice() !== false) : ?> <td class="opt-price"> - <input id="product_option_<%= data.option_id %>_price" - name="product[options][<%= data.option_id %>][price]" + <input id="product_option_<%- data.option_id %>_price" + name="product[options][<%- data.option_id %>][price]" class="input-text validate-number product-option-price" - type="text" value="<%= data.price %>" data-store-label="<%= data.price %>" + type="text" value="<%- data.price %>" data-store-label="<%- data.price %>" <?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled" <?php endif; ?>> </td> - <td class="opt-price-type"><?php echo $block->getPriceTypeSelectHtml() ?><%= data.checkboxScopePrice %></td> + <td class="opt-price-type"><?php echo $block->getPriceTypeSelectHtml() ?><%- data.checkboxScopePrice %></td> <?php else : ?> - <input id="product_option_<%= data.option_id %>_price" name="product[options][<%= data.option_id %>][price]" type="hidden"> - <input id="product_option_<%= data.option_id %>_price_type" name="product[options][<%= data.option_id %>][price_type]" type="hidden"> + <input id="product_option_<%- data.option_id %>_price" name="product[options][<%- data.option_id %>][price]" type="hidden"> + <input id="product_option_<%- data.option_id %>_price_type" name="product[options][<%- data.option_id %>][price_type]" type="hidden"> <?php endif; ?> <td> - <input name="product[options][<%= data.option_id %>][sku]" class="input-text" type="text" value="<%= data.sku %>"> + <input name="product[options][<%- data.option_id %>][sku]" class="input-text" type="text" value="<%- data.sku %>"> </td> <td> - <input name="product[options][<%= data.option_id %>][max_characters]" class="input-text validate-zero-or-greater" type="text" value="<%= data.max_characters %>"> + <input name="product[options][<%- data.option_id %>][max_characters]" class="input-text validate-zero-or-greater" type="text" value="<%- data.max_characters %>"> </td> </tr> </table> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml index 96a541e1ca496228436562cdcfcecac33b2cc5ce..ed0e5a71fc8a359b1e399c3ddaa9ad32bd57723d 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/group.phtml @@ -53,19 +53,19 @@ require([ //<![CDATA[ var groupPriceRowTemplate = '<tr>' + '<td<?php if (!$_showWebsite): ?> style="display:none"<?php endif; ?>>' - + '<select class="<?php echo $_htmlClass; ?> required-entry" name="<?php echo $_htmlName; ?>[<%= data.index %>][website_id]" id="group_price_row_<%= data.index %>_website">' + + '<select class="<?php echo $_htmlClass; ?> required-entry" name="<?php echo $_htmlName; ?>[<%- data.index %>][website_id]" id="group_price_row_<%- data.index %>_website">' <?php foreach ($block->getWebsites() as $_websiteId => $_info) : ?> + '<option value="<?php echo $_websiteId; ?>"><?php echo $block->escapeJsQuote($block->escapeHtml($_info['name'])); ?><?php if (!empty($_info['currency'])) : ?> [<?php echo $block->escapeHtml($_info['currency']); ?>]<?php endif; ?></option>' <?php endforeach; ?> + '</select></td>' - + '<td><select class="<?php echo $_htmlClass; ?> custgroup required-entry" name="<?php echo $_htmlName; ?>[<%= data.index %>][cust_group]" id="group_price_row_<%= data.index %>_cust_group">' + + '<td><select class="<?php echo $_htmlClass; ?> custgroup required-entry" name="<?php echo $_htmlName; ?>[<%- data.index %>][cust_group]" id="group_price_row_<%- data.index %>_cust_group">' <?php foreach ($block->getCustomerGroups() as $_groupId => $_groupName): ?> + '<option value="<?php echo $_groupId; ?>"><?php echo $block->escapeJsQuote($block->escapeHtml($_groupName)); ?></option>' <?php endforeach; ?> + '</select></td>' - + '<td><input class="<?php echo $_htmlClass; ?> required-entry <?php echo $_priceValueValidation; ?>" type="text" name="<?php echo $_htmlName; ?>[<%= data.index %>][price]" value="<%= data.price %>" id="group_price_row_<%= data.index %>_price" /></td>' - + '<td class="col-delete"><input type="hidden" name="<?php echo $_htmlName; ?>[<%= data.index %>][delete]" class="delete" value="" id="group_price_row_<%= data.index %>_delete" />' - + '<button title="<?php echo __('Delete Group Price'); ?>" type="button" class="action- scalable delete icon-btn delete-product-option" id="group_price_row_<%= data.index %>_delete_button" onclick="return groupPriceControl.deleteItem(event);">' + + '<td><input class="<?php echo $_htmlClass; ?> required-entry <?php echo $_priceValueValidation; ?>" type="text" name="<?php echo $_htmlName; ?>[<%- data.index %>][price]" value="<%- data.price %>" id="group_price_row_<%- data.index %>_price" /></td>' + + '<td class="col-delete"><input type="hidden" name="<?php echo $_htmlName; ?>[<%- data.index %>][delete]" class="delete" value="" id="group_price_row_<%- data.index %>_delete" />' + + '<button title="<?php echo __('Delete Group Price'); ?>" type="button" class="action- scalable delete icon-btn delete-product-option" id="group_price_row_<%- data.index %>_delete_button" onclick="return groupPriceControl.deleteItem(event);">' + '<span><?php echo __('Delete'); ?></span></button></td>' + '</tr>'; diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml index faa1bcabeeb586b09c4ba59540661e889edc7541..88815c8734846f0b6406c5f0f8026c79b067dac9 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/edit/price/tier.phtml @@ -56,21 +56,21 @@ require([ //<![CDATA[ var tierPriceRowTemplate = '<tr>' + '<td class="col-websites"<?php if (!$_showWebsite): ?> style="display:none"<?php endif; ?>>' - + '<select class="<?php echo $_htmlClass ?> required-entry" name="<?php echo $_htmlName ?>[<%= data.index %>][website_id]" id="tier_price_row_<%= data.index %>_website">' + + '<select class="<?php echo $_htmlClass ?> required-entry" name="<?php echo $_htmlName ?>[<%- data.index %>][website_id]" id="tier_price_row_<%- data.index %>_website">' <?php foreach ($block->getWebsites() as $_websiteId => $_info): ?> + '<option value="<?php echo $_websiteId ?>"><?php echo $block->escapeJsQuote($block->escapeHtml($_info['name'])) ?><?php if (!empty($_info['currency'])): ?> [<?php echo $block->escapeHtml($_info['currency']) ?>]<?php endif; ?></option>' <?php endforeach ?> + '</select></td>' - + '<td class="col-customer-group"><select class="<?php echo $_htmlClass ?> custgroup required-entry" name="<?php echo $_htmlName ?>[<%= data.index %>][cust_group]" id="tier_price_row_<%= data.index %>_cust_group">' + + '<td class="col-customer-group"><select class="<?php echo $_htmlClass ?> custgroup required-entry" name="<?php echo $_htmlName ?>[<%- data.index %>][cust_group]" id="tier_price_row_<%- data.index %>_cust_group">' <?php foreach ($block->getCustomerGroups() as $_groupId => $_groupName): ?> + '<option value="<?php echo $_groupId ?>"><?php echo $block->escapeJsQuote($block->escapeHtml($_groupName)) ?></option>' <?php endforeach ?> + '</select></td>' - + '<td class="col-qty"><small class="nobr" title="<?php echo __("and above")?>"><?php echo __("and above")?></small><input class="<?php echo $_htmlClass ?> qty required-entry validate-greater-than-zero" type="text" name="<?php echo $_htmlName ?>[<%= data.index %>][price_qty]" value="<%= data.qty %>" id="tier_price_row_<%= data.index %>_qty" />' + + '<td class="col-qty"><small class="nobr" title="<?php echo __("and above")?>"><?php echo __("and above")?></small><input class="<?php echo $_htmlClass ?> qty required-entry validate-greater-than-zero" type="text" name="<?php echo $_htmlName ?>[<%- data.index %>][price_qty]" value="<%- data.qty %>" id="tier_price_row_<%- data.index %>_qty" />' + '</td>' - + '<td class="col-price"><input class="<?php echo $_htmlClass ?> required-entry <?php echo $_priceValueValidation ?>" type="text" name="<?php echo $_htmlName ?>[<%= data.index %>][price]" value="<%= data.price %>" id="tier_price_row_<%= data.index %>_price" /></td>' - + '<td class="col-delete"><input type="hidden" name="<?php echo $_htmlName ?>[<%= data.index %>][delete]" class="delete" value="" id="tier_price_row_<%= data.index %>_delete" />' - + '<button title="<?php echo __("Delete Tier") ?>" type="button" class="action- scalable delete icon-btn delete-product-option" id="tier_price_row_<%= data.index %>_delete_button" onclick="return tierPriceControl.deleteItem(event);">' + + '<td class="col-price"><input class="<?php echo $_htmlClass ?> required-entry <?php echo $_priceValueValidation ?>" type="text" name="<?php echo $_htmlName ?>[<%- data.index %>][price]" value="<%- data.price %>" id="tier_price_row_<%- data.index %>_price" /></td>' + + '<td class="col-delete"><input type="hidden" name="<?php echo $_htmlName ?>[<%- data.index %>][delete]" class="delete" value="" id="tier_price_row_<%- data.index %>_delete" />' + + '<button title="<?php echo __("Delete Tier") ?>" type="button" class="action- scalable delete icon-btn delete-product-option" id="tier_price_row_<%- data.index %>_delete_button" onclick="return tierPriceControl.deleteItem(event);">' + '<span><?php echo __("Delete") ?></span></button></td>' + '</tr>'; diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml index aa29fe4c53d2011c745de696203278e8dabf1b55..73131febf7bf9b03d9c4f79b718991d8440becce 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/helper/gallery.phtml @@ -41,12 +41,12 @@ $elementName = $block->getElement()->getName() . '[images]'; <script id="<?php echo $block->getHtmlId() ?>-template" type="text/x-magento-template"> <div class="image item <% if (data.disabled == 1) { %>hidden-for-front<% } %>" data-role="image"> - <input type="hidden" name="<?php echo $elementName ?>[<%= data.file_id %>][position]" value="<%= data.position %>" class="position"/> - <input type="hidden" name="<?php echo $elementName ?>[<%= data.file_id %>][file]" value="<%= data.file %>"/> - <input type="hidden" name="<?php echo $elementName ?>[<%= data.file_id %>][value_id]" value="<%= data.value_id %>"/> - <input type="hidden" name="<?php echo $elementName ?>[<%= data.file_id %>][label]" value="<%= data.label %>"/> - <input type="hidden" name="<?php echo $elementName ?>[<%= data.file_id %>][disabled]" value="<%= data.disabled %>"/> - <input type="hidden" name="<?php echo $elementName ?>[<%= data.file_id %>][removed]" value="" class="is-removed"/> + <input type="hidden" name="<?php echo $elementName ?>[<%- data.file_id %>][position]" value="<%- data.position %>" class="position"/> + <input type="hidden" name="<?php echo $elementName ?>[<%- data.file_id %>][file]" value="<%- data.file %>"/> + <input type="hidden" name="<?php echo $elementName ?>[<%- data.file_id %>][value_id]" value="<%- data.value_id %>"/> + <input type="hidden" name="<?php echo $elementName ?>[<%- data.file_id %>][label]" value="<%- data.label %>"/> + <input type="hidden" name="<?php echo $elementName ?>[<%- data.file_id %>][disabled]" value="<%- data.disabled %>"/> + <input type="hidden" name="<?php echo $elementName ?>[<%- data.file_id %>][removed]" value="" class="is-removed"/> <ul class="type-labels" style="display: none"> <?php foreach ($block->getImageTypes() as $typeData) { ?> @@ -57,7 +57,7 @@ $elementName = $block->getElement()->getName() . '[images]'; } ?> </ul> <img class="spacer" src="<?php echo $block->getViewFileUrl('images/spacer.gif')?>"/> - <img class="product-image" src="<%= data.url %>" alt="<%= data.label %>"/> + <img class="product-image" src="<%- data.url %>" alt="<%- data.label %>"/> <div class="actions" > <button type="button" class="action-delete" data-role="delete-button" title="<?php echo __('Delete image') ?>"> <span> <?php echo __('Delete image') ?></span > @@ -74,10 +74,10 @@ $elementName = $block->getElement()->getName() . '[images]'; <script class="dialog-template" type="text/x-magento-template" data-title="Image Options"> <div class="image-panel" data-role="dialog"> <div class="image-panel-preview"> - <img src="<%= data.url %>" alt="<%= data.label %>" /> + <img src="<%- data.url %>" alt="<%- data.label %>" /> </div> <div class="image-panel-controls"> - <strong class="image-name"><%= data.label %></strong> + <strong class="image-name"><%- data.label %></strong> <button type="button" class="action-remove" title="<?php echo __('Remove Image'); ?>"> @@ -92,7 +92,7 @@ $elementName = $block->getElement()->getName() . '[images]'; <div class="control"> <textarea id="image-description" rows="3" - name="<?php echo $elementName ?>[<%= data.file_id %>][label]"><%= data.label %></textarea> + name="<?php echo $elementName ?>[<%- data.file_id %>][label]"><%- data.label %></textarea> </div> </div> @@ -125,7 +125,7 @@ $elementName = $block->getElement()->getName() . '[images]'; <input type="checkbox" data-role="visibility-trigger" value="1" - name="<?php echo $elementName ?>[<%= data.file_id %>][disabled]" + name="<?php echo $elementName ?>[<%- data.file_id %>][disabled]" <% if (data.disabled == 1) { %>checked="checked"<% } %> /> <span><?php echo __('Hide from Product Page')?></span> </label> diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml index d9cbf58fbbcd850a204b348e8b44429f16adfe7a..98dbe730e1e75657221f838fb97deedd071d2f58 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/product/edit/attribute/search.phtml @@ -25,9 +25,9 @@ <ul data-mage-init='{"menu":[]}'> <% if (data.items.length) { %> <% _.each(data.items, function(value){ %> - <li <%= data.optionData(value) %>><a href="#"><%= value.label %></a></li> + <li <%- data.optionData(value) %>><a href="#"><%- value.label %></a></li> <% }); %> - <% } else { %><span class="mage-suggest-no-records"><%= data.noRecordsText %></span><% } %> + <% } else { %><span class="mage-suggest-no-records"><%- data.noRecordsText %></span><% } %> </ul> <div class="actions"><?php echo $block->getAttributeCreate()?></div> </script> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml index aa0c404763765b2955ceaeadd231986b006bbb9b..6018b36485e8ac6be25e37475450ad5445fb500c 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/compare/list.phtml @@ -131,14 +131,12 @@ </table> </div> <?php if (!$block->isRedirectToCartEnabled()) : ?> - <script> - require([ - 'jquery', - 'domReady!', - 'Magento_Catalog/js/catalog-add-to-cart' - ], function($) { - $('[data-role=tocart-form]').catalogAddToCart(); - }); + <script type="text/x-magento-init"> + { + "[data-role=tocart-form]": { + "catalogAddToCart": {} + } + } </script> <?php endif; ?> <?php else: ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index b6a7f7a85fbc471fda1c92ba28a56d0099a6d005..742b7521914f3184c54be01918804ccab87775bc 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -133,13 +133,12 @@ $imageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Product\I </div> <?php echo $block->getToolbarHtml() ?> <?php if (!$block->isRedirectToCartEnabled()) : ?> - <script> - require([ - 'jquery', - 'Magento_Catalog/js/catalog-add-to-cart' - ], function($) { - $('[data-role=tocart-form],.form.map.checkout').catalogAddToCart(); - }); + <script type="text/x-magento-init"> + { + "[data-role=tocart-form], .form.map.checkout": { + "catalogAddToCart": {} + } + } </script> <?php endif; ?> <?php endif; ?> diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml index 4e02dc8aa0c72c6a89ee228b75e6d129bcf1bcee..5d78983a248ca004c08b53be5b26cddb717cc769 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/view/base-image.phtml @@ -90,31 +90,31 @@ $thumbHeight = $block->getVar("product_page_more_views:height") ?: $thumbWidth; <a class="gallery control next" data-role="gallery-next" href="#"></a> </script> <script data-template="gallery-base-image" type="text/x-magento-template"> - <a class="product photo<% if (typeof data.hasImg !== 'undefined') { %> placeholder<% } %>" href="<%= data.large %>"> + <a class="product photo<% if (typeof data.hasImg !== 'undefined') { %> placeholder<% } %>" href="<%- data.large %>"> <span class="img photo container"> <img data-role="zoom-image" class="photo image" itemprop="image" <% if (!data.fullSizeMode) { %> - data-large="<%= data.large %>" src="<%= data.medium %>" + data-large="<%- data.large %>" src="<%- data.medium %>" <% } else { %> - src="<%= data.large %>" + src="<%- data.large %>" <% } %> - alt="<%= data.title %>"/> + alt="<%- data.title %>"/> </span> </a> </script> <script data-template="gallery-thumbs" type="text/x-magento-template"> <% if (data.tumbsTitle) { %> - <strong class="title"><%= data.tumbsTitle %></strong> + <strong class="title"><%- data.tumbsTitle %></strong> <% } %> <ul class="items thumbs"> <% _.each(data.images, function(img, index){ %> <li class="item thumb"> - <a title="<%= img.title %>" <% if (img.selected) { %>class="active"<% } %> data-index="<%= index %>" data-role="gallery-thumb" href="#"> + <a title="<%- img.title %>" <% if (img.selected) { %>class="active"<% } %> data-index="<%- index %>" data-role="gallery-thumb" href="#"> <span class="img"> - <img alt="<%= img.title %>" src="<%= img.small %>" itemprop="image" width="<%= data.size.width %>"> + <img alt="<%- img.title %>" src="<%- img.small %>" itemprop="image" width="<%- data.size.width %>"> </span> </a> </li> @@ -127,7 +127,7 @@ $thumbHeight = $block->getVar("product_page_more_views:height") ?: $thumbWidth; </div> </script> <script data-template="zoom-enlarged-image" type="text/x-magento-template"> - <img data-role="enlarged-image" src="<%= data.img %>" /> + <img data-role="enlarged-image" src="<%- data.img %>" /> </script> <script data-template="zoom-track" type="text/x-magento-template"> <div data-role="zoom-track"></div> @@ -136,7 +136,7 @@ $thumbHeight = $block->getVar("product_page_more_views:height") ?: $thumbWidth; <div data-role="zoom-lens"></div> </script> <script data-template="notice" type="text/x-magento-template"> - <p class="notice" data-role="notice"><%= data.text %></p> + <p class="notice" data-role="notice"><%- data.text %></p> </script> <script type="text/x-magento-init"> { diff --git a/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js b/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js index 167d0a749699392f8baac0d29161655ee63bee2c..d48975806a79664906a1ff1ab6954f37ba23f536 100644 --- a/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js +++ b/app/code/Magento/Checkout/view/frontend/web/js/region-updater.js @@ -15,8 +15,8 @@ define([ $.widget('mage.regionUpdater', { options: { regionTemplate: - '<option value="<%= data.value %>" title="<%= data.title %>" <% if (data.isSelected) { %>selected="selected"<% } %>>' + - '<%= data.title %>' + + '<option value="<%- data.value %>" title="<%- data.title %>" <% if (data.isSelected) { %>selected="selected"<% } %>>' + + '<%- data.title %>' + '</option>', isRegionRequired: true, isZipRequired: true, diff --git a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml index 64cfe877c7891b413db49bb43ae2294fc91096f6..f381b09b570eb7e51175a13144d94738d385051e 100644 --- a/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml +++ b/app/code/Magento/Cms/view/adminhtml/templates/browser/content/uploader.phtml @@ -16,8 +16,8 @@ </span> <div class="clear"></div> <script type="text/x-magento-template" id="<?php echo $block->getHtmlId() ?>-template"> - <div id="<%= data.id %>" class="file-row"> - <span class="file-info"><%= data.name %> (<%= data.size %>)</span> + <div id="<%- data.id %>" class="file-row"> + <span class="file-info"><%- data.name %> (<%- data.size %>)</span> <div class="progressbar-container"> <div class="progressbar upload-progress" style="width: 0%;"></div> </div> diff --git a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml index e70c8b95364a8b66912e26bbf77bcdb4518ba14a..bda103c5bd600b6fc93c6459d922988fd8a300ef 100644 --- a/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml +++ b/app/code/Magento/Config/view/adminhtml/templates/system/config/form/field/array.phtml @@ -46,7 +46,7 @@ $_colspan = $block->isAddAfter() ? 2 : 1; // define row prototypeJS template template: mageTemplate( - '<tr id="<%= _id %>">' + '<tr id="<%- _id %>">' <?php foreach ($block->getColumns() as $columnName => $column): ?> + '<td>' + '<?php echo $block->renderCellTemplate($columnName)?>' @@ -54,10 +54,10 @@ $_colspan = $block->isAddAfter() ? 2 : 1; <?php endforeach; ?> <?php if ($block->isAddAfter()): ?> - + '<td><button class="action- add" type="button" id="addAfterBtn<%= _id %>"><span><?php echo __('Add after'); ?><\/span><\/button><\/td>' + + '<td><button class="action- add" type="button" id="addAfterBtn<%- _id %>"><span><?php echo __('Add after'); ?><\/span><\/button><\/td>' <?php endif; ?> - + '<td class="col-actions"><button onclick="arrayRow<?php echo $_htmlId ?>.del(\'<%= _id %>\')" class="action- delete" type="button"><span><?php echo __('Delete'); ?><\/span><\/button><\/td>' + + '<td class="col-actions"><button onclick="arrayRow<?php echo $_htmlId ?>.del(\'<%- _id %>\')" class="action- delete" type="button"><span><?php echo __('Delete'); ?><\/span><\/button><\/td>' +'<\/tr>' ), diff --git a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php index 99a287c10bc9f3918422d8b114638725cb71506f..4862ac145fbba2a2944d20d2169e19146b053d30 100644 --- a/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php +++ b/app/code/Magento/ConfigurableProduct/Block/Product/View/Type/Configurable.php @@ -177,7 +177,7 @@ class Configurable extends \Magento\Catalog\Block\Product\View\AbstractView $config = [ 'attributes' => $attributes['priceOptions'], - 'template' => str_replace('%s', '<%= data.price %>', $store->getCurrentCurrency()->getOutputFormat()), + 'template' => str_replace('%s', '<%- data.price %>', $store->getCurrentCurrency()->getOutputFormat()), 'prices' => [ 'oldPrice' => [ 'amount' => $this->_registerJsPrice($this->_convertPrice($regularPrice->getAmount()->getValue())), diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml index ffb0246382d04a4b777f46a05a4ffd3d544d7365..253b53dca5986a49edcd2863b564773e1b873fb6 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/attribute-js-template.phtml @@ -10,21 +10,21 @@ ?> <script data-template-for="configurable-attribute" type="text/x-magento-template"> <div class="entry-edit" data-role="configurable-attribute" data-attribute="<%- JSON.stringify(data.attribute) %>"> - <input name="attributes[]" id="configurable_attribute_<%= data.attribute.id %>" - value="<%= data.attribute.id %>" type="hidden"> + <input name="attributes[]" id="configurable_attribute_<%- data.attribute.id %>" + value="<%- data.attribute.id %>" type="hidden"> <input value="new" type="hidden" - name="product[configurable_attributes_data][<%= data.attribute.id %>]][id]"/> - <input value="<%= data.attribute.id %>" type="hidden" - name="product[configurable_attributes_data][<%= data.attribute.id %>][attribute_id]"/> + name="product[configurable_attributes_data][<%- data.attribute.id %>]][id]"/> + <input value="<%- data.attribute.id %>" type="hidden" + name="product[configurable_attributes_data][<%- data.attribute.id %>][attribute_id]"/> <input value="" type="hidden" - name="product[configurable_attributes_data][<%= data.attribute.id %>][position]"/> - <input value="<%= data.attribute.code %>" type="hidden" - name="product[configurable_attributes_data][<%= data.attribute.id %>][code]"/> + name="product[configurable_attributes_data][<%- data.attribute.id %>][position]"/> + <input value="<%- data.attribute.code %>" type="hidden" + name="product[configurable_attributes_data][<%- data.attribute.id %>][code]"/> - <div class="fieldset-wrapper collapsable-wrapper" id="<%= data.attribute.id %>-wrapper"> + <div class="fieldset-wrapper collapsable-wrapper" id="<%- data.attribute.id %>-wrapper"> <div class="fieldset-wrapper-title"> - <strong class="title" data-toggle="collapse" data-target="#<%= data.attribute.id %>-content"> - <span><%= data.attribute.label %></span> + <strong class="title" data-toggle="collapse" data-target="#<%- data.attribute.id %>-content"> + <span><%- data.attribute.label %></span> </strong> <div class="actions"> <button type="button" title="<?php echo __('Delete Variations Group')?>" class="action-delete"> @@ -33,23 +33,23 @@ </div> <div class="draggable-handle" title="<?php echo __('Sort Variations')?>"></div> </div> - <div class="fieldset-wrapper-content collapse" id="<%= data.attribute.id %>-content" data-attribute-id="<%= data.attribute.id %>"> + <div class="fieldset-wrapper-content collapse" id="<%- data.attribute.id %>-content" data-attribute-id="<%- data.attribute.id %>"> <fieldset class="fieldset"> <div class="field field-variation"> <label class="label"><span><?php echo __('Variation Label'); ?></span></label> <div class="control"> - <input type="text" value="<%= data.attribute.label %>" - name="product[configurable_attributes_data][<%= data.attribute.id %>][label]" - data-store-label="<%= data.attribute.label %>" + <input type="text" value="<%- data.attribute.label %>" + name="product[configurable_attributes_data][<%- data.attribute.id %>][label]" + data-store-label="<%- data.attribute.label %>" class="store-label required-entry"/> </div> <div class="field-service"> - <label for="attribute-<%= data.attribute.id %>" class="use-default"> + <label for="attribute-<%- data.attribute.id %>" class="use-default"> <input value="1" type="checkbox" class="use-default-control" - name="product[configurable_attributes_data][<%= data.attribute.id %>][use_default]" - id="attribute-<%= data.attribute.id %>"/> + name="product[configurable_attributes_data][<%- data.attribute.id %>][use_default]" + id="attribute-<%- data.attribute.id %>"/> <span class="use-default-label"><?php echo __('Use Default')?></span> </label> </div> @@ -68,11 +68,11 @@ <tbody data-role="options"> <% _.each(data.attribute.options, function(option) { %> <tr data-role="option-container"> - <td class="col-name" data-column="name"><%= option.label %></td> + <td class="col-name" data-column="name"><%- option.label %></td> <td class="col-change-price" data-column="change-price"> <input type="hidden" - name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= option.value %>][value_index]" - value="<%= option.value %>"/> + name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- option.value %>][value_index]" + value="<%- option.value %>"/> <div class="field field-change-pricing"> <div class="control"> @@ -80,13 +80,13 @@ <div class="field field-pricing-value"> <div class="control"> <input type="text" class="pricing-value validate-number" - name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= option.value %>][pricing_value]" + name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- option.value %>][pricing_value]" value=""/> </div> </div> <div class="field field-pricing-measure"> <div class="actions dropdown actions-select"> - <input name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= option.value %>][is_percent]" type="hidden" value="0"/> + <input name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- option.value %>][is_percent]" type="hidden" value="0"/> <button type="button" class="action toggle" data-toggle="dropdown" data-mage-init='{"dropdown":{}}'> <span><?php echo $block->getBaseCurrency()->getSymbol() ?></span> </button> @@ -103,10 +103,10 @@ <td class="col-include" data-column="include"> <div class="field choice"> <input type="hidden" - name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= option.value %>][include]" + name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- option.value %>][include]" value="0"/> <input type="checkbox" class="include" - name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= option.value %>][include]" + name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- option.value %>][include]" value="1" checked="checked"/> </div> </td> @@ -137,7 +137,7 @@ <td class="col-name" data-column="name"> <div class="field"> <div class="control"> - <input name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= data.option.id %>][label]" + <input name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- data.option.id %>][label]" class="required-entry" type="text" placeholder="<?php echo __('begin typing to add value'); ?>" /> </div> @@ -150,12 +150,12 @@ <div class="field field-pricing-value"> <div class="control"> <input type="text" class="pricing-value validate-number" - name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= data.option.id %>][pricing_value]" /> + name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- data.option.id %>][pricing_value]" /> </div> </div> <div class="field field-pricing-measure"> <div class="actions dropdown actions-select"> - <input type="hidden" value="0" name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= data.option.id %>][is_percent]"/> + <input type="hidden" value="0" name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- data.option.id %>][is_percent]"/> <button type="button" class="action toggle" data-toggle="dropdown" data-mage-init='{"dropdown":{}}'> <span><?php echo $block->getBaseCurrency()->getSymbol() ?></span> </button> @@ -172,10 +172,10 @@ <td class="col-include" data-column="include"> <div class="field choice"> <input type="hidden" - name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= data.option.id %>][include]" + name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- data.option.id %>][include]" value="0"/> <input type="checkbox" class="include" - name="product[configurable_attributes_data][<%= data.attribute.id %>][values][<%= data.option.id %>][include]" + name="product[configurable_attributes_data][<%- data.attribute.id %>][values][<%- data.option.id %>][include]" value="1" checked="checked"/> </div> </td> diff --git a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml index 84f9dcccf3032cdc7b5b35b2baa6c68d37bf768a..8f4713df58ef5b5a2b597434c1a031b9c5880c31 100644 --- a/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml +++ b/app/code/Magento/ConfigurableProduct/view/adminhtml/templates/catalog/product/edit/super/matrix.phtml @@ -255,7 +255,7 @@ $productByUsedAttributes = $block->getAssociatedProducts(); </div> </div> <script data-template-for="variation-image" type="text/x-magento-template"> - <img src="<%= data.url %>" class="variation" data-role="image"/> + <img src="<%- data.url %>" class="variation" data-role="image"/> </script> <script> require([ diff --git a/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js index c9dfa4e472f785c7d3e130f2e0b4def23bb20c6e..b14c117584290f347854a621ca7394bb7072c909 100644 --- a/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js +++ b/app/code/Magento/ConfigurableProduct/view/frontend/web/js/configurable.js @@ -34,9 +34,9 @@ define([ priceHolderSelector: '.price-box', state: {}, priceFormat: {}, - optionTemplate: '<%= data.label %>' + + optionTemplate: '<%- data.label %>' + '<% if (data.finalPrice.value) { %>' + - ' <%= data.finalPrice.formatted %>' + + ' <%- data.finalPrice.formatted %>' + '<% } %>', mediaGallerySelector: '[data-role=media-gallery]' }, diff --git a/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml index 7caea5e2d5ae8360469eb9b0ade87f66b5c51da0..a800f91781e3f6cf2fcf8d966186e2a50e17ed3f 100644 --- a/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml +++ b/app/code/Magento/Customer/view/adminhtml/templates/tab/addresses.phtml @@ -11,20 +11,20 @@ <script data-template="tab-address-content" type="text/x-magento-template"> <div> <% if (data.prefix || data.firstname || data.middlename || data.lastname || data.suffix) { %> - <%= data.prefix %> <%= data.firstname %> <%= data.middlename %> <%= data.lastname %> <%= data.suffix %><br/> + <%- data.prefix %> <%- data.firstname %> <%- data.middlename %> <%- data.lastname %> <%- data.suffix %><br/> <% } %> - <% if (data.company) { %><%= data.company %><br/><% } %> - <% if (data.street0) { %><%= data.street0 %><br/><% } %> - <% if (data.street1) { %><%= data.street1 %><br/><% } %> - <% if (data.street2) { %><%= data.street2 %><br/><% } %> - <% if (data.street3) { %><%= data.street3 %><br/><% } %> + <% if (data.company) { %><%- data.company %><br/><% } %> + <% if (data.street0) { %><%- data.street0 %><br/><% } %> + <% if (data.street1) { %><%- data.street1 %><br/><% } %> + <% if (data.street2) { %><%- data.street2 %><br/><% } %> + <% if (data.street3) { %><%- data.street3 %><br/><% } %> <% if (data.city || data.region || data.postcode) { %> - <% if (data.city) { %><%= data.city %><% } %><% if (data.region) { %><% if (data.city) { %>, <% } %><%= data.region %><% } %><% if (data.postcode) { %><% if (data.city || data.region) { %>, <% } %><%= data.postcode %><% } %><br/> + <% if (data.city) { %><%- data.city %><% } %><% if (data.region) { %><% if (data.city) { %>, <% } %><%- data.region %><% } %><% if (data.postcode) { %><% if (data.city || data.region) { %>, <% } %><%- data.postcode %><% } %><br/> <% } %> - <% if (data.country_id) { %><%= data.country_id %><br/><% } %> - <% if (data.telephone) { %>T: <%= data.telephone %><br/><% } %> - <% if (data.fax) { %>F: <%= data.fax %><br/><% } %> - <% if (data.vat_id) { %>VAT: <%= data.vat_id %><% } %> + <% if (data.country_id) { %><%- data.country_id %><br/><% } %> + <% if (data.telephone) { %>T: <%- data.telephone %><br/><% } %> + <% if (data.fax) { %>F: <%- data.fax %><br/><% } %> + <% if (data.vat_id) { %>VAT: <%- data.vat_id %><% } %> </div> </script> @@ -95,11 +95,11 @@ <!-- Template for adding address item to list --> <script data-template="address-tab" type="text/x-magento-template"> <div id="address_item_template" class="hidden template"> - <li class="address-list-item" id="address_item_<%= data.itemId %>" data-item="<%= data.itemId %>"> - <a href="#form_new_item<%= data.itemId %>" data-mage-init='{"dataItemDeleteButton": {}}'> + <li class="address-list-item" id="address_item_<%- data.itemId %>" data-item="<%- data.itemId %>"> + <a href="#form_new_item<%- data.itemId %>" data-mage-init='{"dataItemDeleteButton": {}}'> <?php if (!$block->isReadonly()): ?> <div class="address-list-item-actions"> - <button class="action-delete" type="button" title="Remove address" id="delete_button<%= data.itemId %>" data-role="delete"> + <button class="action-delete" type="button" title="Remove address" id="delete_button<%- data.itemId %>" data-role="delete"> <span>Remove address</span> </button> <button class="action-edit" type="button" title="Edit address"> @@ -113,14 +113,14 @@ </address> </a> <div class="field choice field-address-item-billing"> - <input type="checkbox" <?php if ($block->isReadonly()):?> disabled="disabled"<?php endif;?> value="_item<%= data.itemId %>" id="address_item_billing_item<%= data.itemId %>" name="account[default_billing]" title="<?php echo __('Set as Default Billing Address') ?>" /> - <label class="label" for="address_item_billing_item<%= data.itemId %>"> + <input type="checkbox" <?php if ($block->isReadonly()):?> disabled="disabled"<?php endif;?> value="_item<%- data.itemId %>" id="address_item_billing_item<%- data.itemId %>" name="account[default_billing]" title="<?php echo __('Set as Default Billing Address') ?>" /> + <label class="label" for="address_item_billing_item<%- data.itemId %>"> <span><?php echo __('Default Billing Address') ?></span> </label> </div> <div class="field choice field-address-item-shipping"> - <input type="checkbox" <?php if ($block->isReadonly()):?> disabled="disabled"<?php endif;?> value="_item<%= data.itemId %>" id="address_item_shipping_item<%= data.itemId %>" name="account[default_shipping]" title="<?php echo __('Set as Default Shipping Address') ?>"/> - <label class="label" for="address_item_shipping_item<%= data.itemId %>"> + <input type="checkbox" <?php if ($block->isReadonly()):?> disabled="disabled"<?php endif;?> value="_item<%- data.itemId %>" id="address_item_shipping_item<%- data.itemId %>" name="account[default_shipping]" title="<?php echo __('Set as Default Shipping Address') ?>"/> + <label class="label" for="address_item_shipping_item<%- data.itemId %>"> <span><?php echo __('Default Shipping Address') ?></span> </label> </div> @@ -132,8 +132,8 @@ <?php $_templatePrefix = $block->getTemplatePrefix() ?> <script data-template="address-form" type="text/x-magento-template"> <div id="address_form_template" class="no-display template"><!-- Don`t delete class no-display, save customer stops work --> - <div id="form_<%= data.formName %>" data-item="<%= data.itemCount %>" class="address-item-edit-content" - data-mage-init='{"observableInputs":{"name": "<%= data.formName %>"}}'> + <div id="form_<%- data.formName %>" data-item="<%- data.itemCount %>" class="address-item-edit-content" + data-mage-init='{"observableInputs":{"name": "<%- data.formName %>"}}'> <?php // Set form template elements prefix $block->getForm()->setHtmlIdPrefix($_templatePrefix) diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml index 8e71ed9541144c18cdaa6f9784aa0216d361b987..8958f0301853197e9e989924c60f02b5dc0260b5 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/code/js.phtml @@ -28,8 +28,8 @@ </div> </div> <script id="js-file-uploader-template" type="text/x-magento-template"> - <div id="<%= data.id %>" class="file-row"> - <span class="file-info"><%= data.name %> (<%= data.size %>)</span> + <div id="<%- data.id %>" class="file-row"> + <span class="file-info"><%- data.name %> (<%- data.size %>)</span> <div class="progressbar-container"> <div class="progressbar upload-progress" style="width: 0%;"></div> </div> @@ -38,8 +38,8 @@ </script> <script id="js-uploaded-file-template" type="text/x-magento-template"> - <span class="filename" title="<%= data.name %>"><%= data.name %></span> - <a href="#" class="action-delete" title="<?php echo __('Delete File'); ?>" data-id="<%= data.id %>"> + <span class="filename" title="<%- data.name %>"><%- data.name %></span> + <a href="#" class="action-delete" title="<?php echo __('Delete File'); ?>" data-id="<%- data.id %>"> <span><?php echo __('Delete File'); ?></span> </a> </script> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/uploader.phtml b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/uploader.phtml index 792be29aa981896889296e1a85ff669cde14a706..dbda7bb3e0d47595072a0c13e8f68ce6f50594e7 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/uploader.phtml +++ b/app/code/Magento/DesignEditor/view/adminhtml/templates/editor/tools/files/content/uploader.phtml @@ -10,15 +10,15 @@ <div class="scroll-assets"> <script data-template="<?php echo $block->getHtmlId() ?>-template" type="text/x-magento-template"> <div class="progressbar-container"> - <div class="file-row" data-upload-id="<%= data.id %>"> - <span class="file-info-name"><%= data.name %></span> + <div class="file-row" data-upload-id="<%- data.id %>"> + <span class="file-info-name"><%- data.name %></span> <span class="file-info-details"> - <span class="file-info-size">(<%= data.size %>)</span> + <span class="file-info-size">(<%- data.size %>)</span> <span class="file-info-error hidden"> </span> </span> <span class="file-icon"> <span class="file-info-cancel"> - <button type="button" class="action-delete" data-delete-file="<%= data.id %>"> + <button type="button" class="action-delete" data-delete-file="<%- data.id %>"> <span><?php echo __('Remove'); ?></span> </button> </span> diff --git a/app/code/Magento/DesignEditor/view/adminhtml/web/js/dialog.js b/app/code/Magento/DesignEditor/view/adminhtml/web/js/dialog.js index 983fff295955bc254d03667afaa8dc3bf101f994..ad58d32bcbe86077a511d6c2971e2e2efbe943ea 100644 --- a/app/code/Magento/DesignEditor/view/adminhtml/web/js/dialog.js +++ b/app/code/Magento/DesignEditor/view/adminhtml/web/js/dialog.js @@ -46,7 +46,7 @@ define([ return ['success', 'error', 'info'].indexOf(type) != -1; }, _prepareMessage: function(message, type) { - var tmpl = mageTemplate('<div class="<%= data.classes %>"><%= data.message %></div>'); + var tmpl = mageTemplate('<div class="<%- data.classes %>"><%- data.message %></div>'); if (typeof message != 'string' && message.message && message.type) { type = message.type; diff --git a/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml b/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml index b2486cfcbd3786e6f36430c4694c8efd6bb06d63..70ae82aee847533e40c9bf447e75c207c8c2d5ff 100644 --- a/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml +++ b/app/code/Magento/DesignEditor/view/frontend/templates/translate_inline.phtml @@ -13,19 +13,19 @@ <link rel="stylesheet" type="text/css" href="<?php echo $block->getViewFileUrl('mage/translate-inline-vde.css') ?>"/> <script id="translate-inline-dialog-form-template" type="text/x-magento-template"> - <form id="<%= data.id %>" data-form="translate-inline-dialog-form"> + <form id="<%- data.id %>" data-form="translate-inline-dialog-form"> <% _.each(data.items, function(item, index) { %> - <input id="perstore_<%= index %>" name="translate[<%= index %>][perstore]" type="hidden" value="0"/> - <input name="translate[<%= index %>][original]" type="hidden" value="<%= data.escape(item.original) %>"/> - <textarea id="custom_<%= index %>" - name="translate[<%= index %>][custom]" - data-translate-input-index="<%= index %>"><%= data.escape(item.translated) %></textarea> + <input id="perstore_<%- index %>" name="translate[<%- index %>][perstore]" type="hidden" value="0"/> + <input name="translate[<%- index %>][original]" type="hidden" value="<%- data.escape(item.original) %>"/> + <textarea id="custom_<%- index %>" + name="translate[<%- index %>][custom]" + data-translate-input-index="<%- index %>"><%- data.escape(item.translated) %></textarea> <% }); %> </form> </script> <script data-template="translate-inline-icon" type="text/x-magento-template"> - <img src="<%= data.img %>" height="16" width="16" class="translate-edit-icon"> + <img src="<%- data.img %>" height="16" width="16" class="translate-edit-icon"> </script> <div id="translate-dialog" data-role="translate-dialog" diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml index aa2a922757ac2a5c6a1da63ac097b9a9bf1106dd..db3a01d67c3cf61a3b8469d5b995c2dbd79b0810 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable.phtml @@ -24,11 +24,11 @@ require([ //<![CDATA[> var uploaderTemplate = '<div class="no-display" id="[[idName]]-template">' + - '<div id="<%= data.id %>" class="file-row file-row-narrow">' + + '<div id="<%- data.id %>" class="file-row file-row-narrow">' + '<span class="file-info">' + - '<span class="file-info-name"><%= data.name %></span>' + + '<span class="file-info-name"><%- data.name %></span>' + ' ' + - '<span class="file-info-size">(<%= data.size %>)</span>' + + '<span class="file-info-size">(<%- data.size %>)</span>' + '</span>' + '<div class="progressbar-container">' + '<div class="progressbar upload-progress" style="width: 0%;"></div>' + @@ -37,13 +37,13 @@ var uploaderTemplate = '<div class="no-display" id="[[idName]]-template">' + '</div>' + '</div>' + '<div class="no-display" id="[[idName]]-template-progress">' + - '<%= data.percent %>% <%= data.uploaded %> / <%= data.total %>' + + '<%- data.percent %>% <%- data.uploaded %> / <%- data.total %>' + '</div>'; var fileListTemplate = '<span class="file-info">' + - '<span class="file-info-name"><%= data.name %></span>' + + '<span class="file-info-name"><%- data.name %></span>' + ' ' + - '<span class="file-info-size">(<%= data.size %>)</span>' + + '<span class="file-info-size">(<%- data.size %>)</span>' + '</span>'; window.Downloadable = { diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml index b110d63d00c79b245d5cb4f6b48c8814b43b025a..bf2b72140ba8a082faa3e7824016fe7310ce724b 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/links.phtml @@ -80,29 +80,29 @@ require([ registry.get('downloadable', function (Downloadable) { var linkTemplate = '<tr>'+ '<td>'+ - '<input type="hidden" class="__delete__" name="downloadable[link][<%= data.id %>][is_delete]" value="" />'+ - '<input type="hidden" name="downloadable[link][<%= data.id %>][link_id]" value="<%= data.link_id %>" />'+ - '<input type="text" class="required-entry input-text" name="downloadable[link][<%= data.id %>][title]" value="<%= data.title %>" />'+ - '<?php echo $_product->getStoreId() ? '<input type="checkbox" id="downloadable_link_<%= data.id %>_title" name="downloadable[link][<%= data.id %>][use_default_title]" value="1" /><label class="normal" for="downloadable_link_<%= data.id %>_title">Use Default Value</label>' : '' ?>'+ + '<input type="hidden" class="__delete__" name="downloadable[link][<%- data.id %>][is_delete]" value="" />'+ + '<input type="hidden" name="downloadable[link][<%- data.id %>][link_id]" value="<%- data.link_id %>" />'+ + '<input type="text" class="required-entry input-text" name="downloadable[link][<%- data.id %>][title]" value="<%- data.title %>" />'+ + '<?php echo $_product->getStoreId() ? '<input type="checkbox" id="downloadable_link_<%- data.id %>_title" name="downloadable[link][<%- data.id %>][use_default_title]" value="1" /><label class="normal" for="downloadable_link_<%- data.id %>_title">Use Default Value</label>' : '' ?>'+ '</td>'+ <?php if ($block->getCanReadPrice() !== false) : ?> '<td class="input-price">'+ - '<input type="text" id="downloadable_link_<%= data.id %>_price_value" class="input-text validate-number link-prices<?php if ($block->getCanEditPrice() === false) : ?> disabled<?php endif; ?>" name="downloadable[link][<%= data.id %>][price]" value="<%= data.price %>"<?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> ' + + '<input type="text" id="downloadable_link_<%- data.id %>_price_value" class="input-text validate-number link-prices<?php if ($block->getCanEditPrice() === false) : ?> disabled<?php endif; ?>" name="downloadable[link][<%- data.id %>][price]" value="<%- data.price %>"<?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> ' + '<label>[<?php echo $block->getBaseCurrencyCode($_product->getStoreId()) ?>]</label>' + <?php if ($_product->getStoreId() && $block->getIsPriceWebsiteScope()) : ?> - '<br /><input type="checkbox" id="downloadable_link_<%= data.id %>_price" name="downloadable[link][<%= data.id %>][use_default_price]" value="1"<?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> <label for="downloadable_link_<%= data.id %>_price">Use Default Value</label>' + + '<br /><input type="checkbox" id="downloadable_link_<%- data.id %>_price" name="downloadable[link][<%- data.id %>][use_default_price]" value="1"<?php if ($block->getCanEditPrice() === false) : ?> disabled="disabled"<?php endif; ?> /> <label for="downloadable_link_<%- data.id %>_price">Use Default Value</label>' + <?php endif; ?> '</td>' + <?php else : ?> - '<input type="hidden" id="downloadable_link_<%= data.id %>_price_value" class="link-prices" name="downloadable[link][<%= data.id %>][price]" value="0" />' + + '<input type="hidden" id="downloadable_link_<%- data.id %>_price_value" class="link-prices" name="downloadable[link][<%- data.id %>][price]" value="0" />' + <?php if ($_product->getStoreId() && $block->getIsPriceWebsiteScope()) : ?> - '<input type="hidden" id="downloadable_link_<%= data.id %>_price" name="downloadable[link][<%= data.id %>][use_default_price]" value="1" />' + + '<input type="hidden" id="downloadable_link_<%- data.id %>_price" name="downloadable[link][<%- data.id %>][use_default_price]" value="1" />' + <?php endif; ?> <?php endif; ?> - '<td><input type="text" id="downloadable_link_<%= data.id %>_downloads" name="downloadable[link][<%= data.id %>][number_of_downloads]" class="input-text downloads" value="<%= data.number_of_downloads %>" />'+ - '<p><input type="checkbox" class="checkbox" id="downloadable_link_<%= data.id %>_is_unlimited" name="downloadable[link][<%= data.id %>][is_unlimited]" value="1" <%= data.is_unlimited %> /> <label for="downloadable_link_<%= data.id %>_is_unlimited">Unlimited</label></p></td>'+ + '<td><input type="text" id="downloadable_link_<%- data.id %>_downloads" name="downloadable[link][<%- data.id %>][number_of_downloads]" class="input-text downloads" value="<%- data.number_of_downloads %>" />'+ + '<p><input type="checkbox" class="checkbox" id="downloadable_link_<%- data.id %>_is_unlimited" name="downloadable[link][<%- data.id %>][is_unlimited]" value="1" <%- data.is_unlimited %> /> <label for="downloadable_link_<%- data.id %>_is_unlimited">Unlimited</label></p></td>'+ '<td>'+ - '<select id="downloadable_link _<%= data.id %>_shareable" name="downloadable[link][<%= data.id %>][is_shareable]">'+ + '<select id="downloadable_link _<%- data.id %>_shareable" name="downloadable[link][<%- data.id %>][is_shareable]">'+ '<option value="1">Yes</option>'+ '<option value="0">No</option>'+ '<option value="2" selected="selected">Use config</option>'+ @@ -111,58 +111,58 @@ require([ '<td>'+ '<div class="files">'+ '<div class="row">'+ - '<label for="downloadable_link_<%= data.id %>_sample_file_type"><input type="radio" class="radio" id="downloadable_link_<%= data.id %>_sample_file_type" name="downloadable[link][<%= data.id %>][sample][type]" value="file"<%= data.sample_file_checked %> /> File:</label>'+ - '<input type="hidden" id="downloadable_link_<%= data.id %>_sample_file_save" name="downloadable[link][<%= data.id %>][sample][file]" value="<%= data.sample_file_save %>" class="validate-downloadable-file"/>'+ - '<div id="downloadable_link_<%= data.id %>_sample_file" class="uploader">'+ - '<div id="downloadable_link_<%= data.id %>_sample_file-old" class="file-row-info"></div>'+ - '<div id="downloadable_link_<%= data.id %>_sample_file-new" class="file-row-info"></div>'+ + '<label for="downloadable_link_<%- data.id %>_sample_file_type"><input type="radio" class="radio" id="downloadable_link_<%- data.id %>_sample_file_type" name="downloadable[link][<%- data.id %>][sample][type]" value="file"<%- data.sample_file_checked %> /> File:</label>'+ + '<input type="hidden" id="downloadable_link_<%- data.id %>_sample_file_save" name="downloadable[link][<%- data.id %>][sample][file]" value="<%- data.sample_file_save %>" class="validate-downloadable-file"/>'+ + '<div id="downloadable_link_<%- data.id %>_sample_file" class="uploader">'+ + '<div id="downloadable_link_<%- data.id %>_sample_file-old" class="file-row-info"></div>'+ + '<div id="downloadable_link_<%- data.id %>_sample_file-new" class="file-row-info"></div>'+ '<div class="fileinput-button form-buttons">'+ '<span><?php echo __('Browse Files...') ?></span>' + - '<input id="downloadable_link_<%= data.id %>_sample_file" type="file" name="<?php echo $block->getFileFieldName('link_samples') ?>">' + + '<input id="downloadable_link_<%- data.id %>_sample_file" type="file" name="<?php echo $block->getFileFieldName('link_samples') ?>">' + '<script>' + - 'linksUploader("#downloadable_link_<%= data.id %>_sample_file", "<?php echo $block->getUploadUrl('link_samples') ?>"); ' + + 'linksUploader("#downloadable_link_<%- data.id %>_sample_file", "<?php echo $block->getUploadUrl('link_samples') ?>"); ' + '</scr'+'ipt>'+ '</div>'+ '<div class="clear"></div>'+ '</div>'+ '</div>'+ '<div class="row">'+ - '<label for="downloadable_link_<%= data.id %>_sample_url_type"><input type="radio" class="radio" id="downloadable_link_<%= data.id %>_sample_url_type" name="downloadable[link][<%= data.id %>][sample][type]" value="url"<%= data.sample_url_checked %> /> URL:</label><input type="text" class="input-text validate-downloadable-url validate-url" name="downloadable[link][<%= data.id %>][sample][url]" value="<%= data.sample_url %>" />'+ + '<label for="downloadable_link_<%- data.id %>_sample_url_type"><input type="radio" class="radio" id="downloadable_link_<%- data.id %>_sample_url_type" name="downloadable[link][<%- data.id %>][sample][type]" value="url"<%- data.sample_url_checked %> /> URL:</label><input type="text" class="input-text validate-downloadable-url validate-url" name="downloadable[link][<%- data.id %>][sample][url]" value="<%- data.sample_url %>" />'+ '</div>'+ '<div>'+ - '<span id="downloadable_link_<%= data.id %>_sample_container"></span>'+ + '<span id="downloadable_link_<%- data.id %>_sample_container"></span>'+ '</div>'+ '</div>'+ '</td>'+ '<td>'+ '<div class="files">'+ '<div class="row">'+ - '<label for="downloadable_link_<%= data.id %>_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_<%= data.id %>_file_type" name="downloadable[link][<%= data.id %>][type]" value="file"<%= data.file_checked %> /> File:</label>'+ - '<input type="hidden" class="validate-downloadable-file" id="downloadable_link_<%= data.id %>_file_save" name="downloadable[link][<%= data.id %>][file]" value="<%= data.file_save %>" />'+ - '<div id="downloadable_link_<%= data.id %>_file" class="uploader">'+ - '<div id="downloadable_link_<%= data.id %>_file-old" class="file-row-info"></div>'+ - '<div id="downloadable_link_<%= data.id %>_file-new" class="file-row-info new-file"></div>'+ + '<label for="downloadable_link_<%- data.id %>_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_<%- data.id %>_file_type" name="downloadable[link][<%- data.id %>][type]" value="file"<%- data.file_checked %> /> File:</label>'+ + '<input type="hidden" class="validate-downloadable-file" id="downloadable_link_<%- data.id %>_file_save" name="downloadable[link][<%- data.id %>][file]" value="<%- data.file_save %>" />'+ + '<div id="downloadable_link_<%- data.id %>_file" class="uploader">'+ + '<div id="downloadable_link_<%- data.id %>_file-old" class="file-row-info"></div>'+ + '<div id="downloadable_link_<%- data.id %>_file-new" class="file-row-info new-file"></div>'+ '<div class="fileinput-button form-buttons">'+ '<span><?php echo __('Browse Files...') ?></span>' + - '<input id="downloadable_link_<%= data.id %>_file" type="file" name="<?php echo $block->getFileFieldName('links') ?>">' + + '<input id="downloadable_link_<%- data.id %>_file" type="file" name="<?php echo $block->getFileFieldName('links') ?>">' + '<script>' + - 'linksUploader("#downloadable_link_<%= data.id %>_file", "<?php echo $block->getUploadUrl('links') ?>"); ' + + 'linksUploader("#downloadable_link_<%- data.id %>_file", "<?php echo $block->getUploadUrl('links') ?>"); ' + '</scr'+'ipt>'+ '</div>'+ '<div class="clear"></div>'+ '</div>'+ '</div>'+ '<div class="row">'+ - '<label for="downloadable_link_<%= data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_<%= data.id %>_url_type" name="downloadable[link][<%= data.id %>][type]" value="url"<%= data.url_checked %> /> URL:</label><input type="text" class="validate-downloadable-url validate-url input-text" name="downloadable[link][<%= data.id %>][link_url]" value="<%= data.link_url %>" />'+ + '<label for="downloadable_link_<%- data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_link_<%- data.id %>_url_type" name="downloadable[link][<%- data.id %>][type]" value="url"<%- data.url_checked %> /> URL:</label><input type="text" class="validate-downloadable-url validate-url input-text" name="downloadable[link][<%- data.id %>][link_url]" value="<%- data.link_url %>" />'+ '</div>'+ '<div>'+ - '<span id="downloadable_link_<%= data.id %>_link_container"></span>'+ + '<span id="downloadable_link_<%- data.id %>_link_container"></span>'+ '</div>'+ '</div>'+ '</td>'+ - '<td><input type="text" name="downloadable[link][<%= data.id %>][sort_order]" value="<%= data.sort_order %>" class="input-text sort" /></td>'+ + '<td><input type="text" name="downloadable[link][<%- data.id %>][sort_order]" value="<%- data.sort_order %>" class="input-text sort" /></td>'+ '<td class="col-delete">'+ - '<button id="downloadable_link_<%= data.id %>_delete_button" type="button" class="action- scalable delete delete-link-item"><span><span><span><?php echo __('Delete'); ?></span></span></span></button>'+ + '<button id="downloadable_link_<%- data.id %>_delete_button" type="button" class="action- scalable delete delete-link-item"><span><span><span><?php echo __('Delete'); ?></span></span></span></button>'+ '</td>'+ '</tr>'; diff --git a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml index bde508869e2eef8ec0a93d9f2a6fcf0bd01737d6..525009f591747a531c55553aeb251e81cad8d6b4 100644 --- a/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml +++ b/app/code/Magento/Downloadable/view/adminhtml/templates/product/edit/downloadable/samples.phtml @@ -61,25 +61,25 @@ require([ registry.get('downloadable', function (Downloadable) { var sampleTemplate = '<tr>'+ '<td>'+ - '<input type="hidden" class="__delete__" name="downloadable[sample][<%= data.id %>][is_delete]" value="" />'+ - '<input type="hidden" name="downloadable[sample][<%= data.id %>][sample_id]" value="<%= data.sample_id %>" />'+ - '<input type="text" class="required-entry input-text" name="downloadable[sample][<%= data.id %>][title]" value="<%= data.title %>" />'+ - '<?php echo $_product->getStoreId() ? '<br /><input type="checkbox" id="downloadable_sample_<%= data.id %>_title" name="downloadable[sample][<%= data.id %>][use_default_title]" value="1" /><label class="normal" for="downloadable_sample_<%= data.id %>_title">Use Default Value</label>' : '' ?>'+ + '<input type="hidden" class="__delete__" name="downloadable[sample][<%- data.id %>][is_delete]" value="" />'+ + '<input type="hidden" name="downloadable[sample][<%- data.id %>][sample_id]" value="<%- data.sample_id %>" />'+ + '<input type="text" class="required-entry input-text" name="downloadable[sample][<%- data.id %>][title]" value="<%- data.title %>" />'+ + '<?php echo $_product->getStoreId() ? '<br /><input type="checkbox" id="downloadable_sample_<%- data.id %>_title" name="downloadable[sample][<%- data.id %>][use_default_title]" value="1" /><label class="normal" for="downloadable_sample_<%- data.id %>_title">Use Default Value</label>' : '' ?>'+ '</td>'+ '<td>'+ '<div class="files-wide">'+ '<div class="row">'+ - '<label for="downloadable_sample_<%= data.id %>_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_<%= data.id %>_file_type" name="downloadable[sample][<%= data.id %>][type]" value="file"<%= data.file_checked %> /> File:</label>'+ - '<input type="hidden" class="validate-downloadable-file" id="downloadable_sample_<%= data.id %>_file_save" name="downloadable[sample][<%= data.id %>][file]" value="<%= data.file_save %>" />'+ - '<div id="downloadable_sample_<%= data.id %>_file" class="uploader">'+ - '<div id="downloadable_sample_<%= data.id %>_file-old" class="file-row-info"></div>'+ - '<div id="downloadable_sample_<%= data.id %>_file-new" class="file-row-info new-file"></div>'+ + '<label for="downloadable_sample_<%- data.id %>_file_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_<%- data.id %>_file_type" name="downloadable[sample][<%- data.id %>][type]" value="file"<%- data.file_checked %> /> File:</label>'+ + '<input type="hidden" class="validate-downloadable-file" id="downloadable_sample_<%- data.id %>_file_save" name="downloadable[sample][<%- data.id %>][file]" value="<%- data.file_save %>" />'+ + '<div id="downloadable_sample_<%- data.id %>_file" class="uploader">'+ + '<div id="downloadable_sample_<%- data.id %>_file-old" class="file-row-info"></div>'+ + '<div id="downloadable_sample_<%- data.id %>_file-new" class="file-row-info new-file"></div>'+ '<div class="fileinput-button form-buttons">'+ '<span><?php echo __('Browse Files...') ?></span>' + - '<input id="downloadable_sample_<%= data.id %>_file" type="file" name="<?php echo $block->getConfig()->getFileField() ?>" data-url="<?php echo $block->getConfig()->getUrl() ?>">' + + '<input id="downloadable_sample_<%- data.id %>_file" type="file" name="<?php echo $block->getConfig()->getFileField() ?>" data-url="<?php echo $block->getConfig()->getUrl() ?>">' + '<script>' + '/*<![CDATA[*/' + - 'sampleUploader("#downloadable_sample_<%= data.id %>_file"); ' + + 'sampleUploader("#downloadable_sample_<%- data.id %>_file"); ' + '/*]]>*/' + '</scr'+'ipt>'+ '</div>'+ @@ -87,15 +87,15 @@ require([ '</div>'+ '</div>'+ '<div class="row">'+ - '<label for="downloadable_sample_<%= data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_<%= data.id %>_url_type" name="downloadable[sample][<%= data.id %>][type]" value="url"<%= data.url_checked %> /> URL:</label> <input type="text" class="validate-downloadable-url validate-url input-text" name="downloadable[sample][<%= data.id %>][sample_url]" value="<%= data.sample_url %>" />'+ + '<label for="downloadable_sample_<%- data.id %>_url_type"><input type="radio" class="radio validate-one-required-by-name" id="downloadable_sample_<%- data.id %>_url_type" name="downloadable[sample][<%- data.id %>][type]" value="url"<%- data.url_checked %> /> URL:</label> <input type="text" class="validate-downloadable-url validate-url input-text" name="downloadable[sample][<%- data.id %>][sample_url]" value="<%- data.sample_url %>" />'+ '</div>'+ '<div>'+ - '<span id="downloadable_sample_<%= data.id %>_container"></span>'+ + '<span id="downloadable_sample_<%- data.id %>_container"></span>'+ '</div>'+ '</div>'+ '</td>'+ - '<td><input type="text" name="downloadable[sample][<%= data.id %>][sort_order]" value="<%= data.sort_order %>" class="input-text sort" /></td>'+ + '<td><input type="text" name="downloadable[sample][<%- data.id %>][sort_order]" value="<%- data.sort_order %>" class="input-text sort" /></td>'+ '<td class="col-delete">'+ '<button type="button" class="action- scalable delete icon-btn delete-sample-item"><span>Delete</span></button>'+ '</td>'+ diff --git a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php index 79a7197d04206cb5c6dce13979680f7149264469..059b9492610d43eea619399493c45173da1e33bc 100644 --- a/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php +++ b/app/code/Magento/GoogleShopping/Block/Adminhtml/Types/Edit/Attributes.php @@ -131,9 +131,9 @@ class Attributes extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\El $select = $this->getLayout()->createBlock( 'Magento\GoogleShopping\Block\Adminhtml\Types\Edit\Select' )->setId( - $this->getFieldId() . '_<%= data.index %>_gattribute' + $this->getFieldId() . '_<%- data.index %>_gattribute' )->setName( - $this->getFieldName() . '[<%= data.index %>][gcontent_attribute]' + $this->getFieldName() . '[<%- data.index %>][gcontent_attribute]' )->setOptions( $options ); @@ -152,9 +152,9 @@ class Attributes extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\El $select = $this->getLayout()->createBlock( 'Magento\Framework\View\Element\Html\Select' )->setId( - $this->getFieldId() . '_<%= data.index %>_attribute' + $this->getFieldId() . '_<%- data.index %>_attribute' )->setName( - $this->getFieldName() . '[<%= data.index %>][attribute_id]' + $this->getFieldName() . '[<%- data.index %>][attribute_id]' )->setOptions( $this->_getAttributes($this->getAttributeSetId(), $escapeJsQuotes) ); diff --git a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml index 82dfc0457cfd9c92a924cded4a157620eaf84236..03790f402f19a7d9e8cc601cb74a181cc4d7747e 100644 --- a/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml +++ b/app/code/Magento/GoogleShopping/view/adminhtml/templates/types/edit/attributes.phtml @@ -69,10 +69,10 @@ Gcontent.Attribute.prototype = { } } -var attributesSelectTemplate = '<tr id="<?php echo $block->getFieldId() ?>_<%= data.index %>">' + +var attributesSelectTemplate = '<tr id="<?php echo $block->getFieldId() ?>_<%- data.index %>">' + '<td>'+ '<?php echo $block->getAttributesSelectHtml(true) ?>' + - '<input type="hidden" name="<?php echo $block->getFieldName() ?>[<%= data.index %>][delete]" class="delete" value="">' + + '<input type="hidden" name="<?php echo $block->getFieldName() ?>[<%- data.index %>][delete]" class="delete" value="">' + '</td>' + '<td><?php echo $block->getGcontentAttributesSelectHtml() ?></td>' + '<td class="col-delete">' + <?php echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getDeleteButtonHtml()) ?> + '</td>' + diff --git a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml index d9e2b3e0aeb6eba332a17850e9fff66ca3d2da44..de0a513ca84823ca9faa42af5e247655f4eb73fe 100644 --- a/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml +++ b/app/code/Magento/GroupedProduct/view/adminhtml/templates/product/grouped/list.phtml @@ -11,30 +11,30 @@ <span class="draggable-handle"></span> <input type="hidden" - name="links[associated][<%= data.id %>][id]" - value="<%= data.id %>" + name="links[associated][<%- data.id %>][id]" + value="<%- data.id %>" data-role="id" /> <input type="hidden" - name="links[associated][<%= data.id %>][position]" - value="<%= data.position %>" + name="links[associated][<%- data.id %>][position]" + value="<%- data.position %>" data-role="position" /> </td> <td data-column="name" class="editable col-name"> - <%= data.name %> + <%- data.name %> </td> <td data-column="sku" class="col-sku"> - <%= data.sku %> + <%- data.sku %> </td> <td data-column="price" class="col-price"> - <%= data.price %> + <%- data.price %> </td> <td data-column="qty" class="editable col-qty col-number"> <input type="text" class="input-text " - name="links[associated][<%= data.id %>][qty]" - value="<%= data.qty %>"> + name="links[associated][<%- data.id %>][qty]" + value="<%- data.qty %>"> </td> <td data-column="actions" class="col-actions"> <button type="button" class="action- delete" data-role="delete"></button> diff --git a/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml b/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml index c2a224258c246cce788667ba43ce9b636039be13..8d711654da66d079380348542d5680d39a73df0f 100644 --- a/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml +++ b/app/code/Magento/Multishipping/view/frontend/templates/checkout/address/select.phtml @@ -39,13 +39,13 @@ </div> </div> </div> -<script> -require(['jquery', 'mage/mage'], function(jQuery){ - - jQuery('.actions').mage('address', { - addAddress: "button[role='add-address']", - addAddressLocation: '<?php echo $block->getAddNewUrl() ?>' - }); - -}); +<script type="text/x-magento-init"> + { + ".actions": { + "address": { + "addAddress": "button[role='add-address']", + "addAddressLocation": "<?php echo $block->getAddNewUrl() ?>" + } + } + } </script> diff --git a/app/code/Magento/Search/view/frontend/web/form-mini.js b/app/code/Magento/Search/view/frontend/web/form-mini.js index 871edd66681497704ab6ec92b93175cd352339e3..be0ae90a02a9180a79487dde5f4394d09ddb59c6 100644 --- a/app/code/Magento/Search/view/frontend/web/form-mini.js +++ b/app/code/Magento/Search/view/frontend/web/form-mini.js @@ -29,14 +29,14 @@ define([ responseFieldElements: 'ul li', selectClass: 'selected', template: - '<li class="<%= data.row_class %>" id="qs-option-<%= data.index %>" role="option">' + - '<span class="qs-option-name">' + - ' <%= data.title %>' + - '</span>' + - '<span aria-hidden="true" class="amount">' + - '<%= data.num_results %>' + - '</span>' + - '</li>', + '<li class="<%- data.row_class %>" id="qs-option-<%- data.index %>" role="option">' + + '<span class="qs-option-name">' + + ' <%- data.title %>' + + '</span>' + + '<span aria-hidden="true" class="amount">' + + '<%- data.num_results %>' + + '</span>' + + '</li>', submitBtn: 'button[type="submit"]', searchLabel: '[data-role=minisearch-label]' }, diff --git a/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml b/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml index bac14a083a12f626d995289ef371ae24a0d10508..eb8e4f7cef56f25176d3c9f3e69a685daea9e41d 100644 --- a/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml +++ b/app/code/Magento/Sendfriend/view/frontend/templates/send.phtml @@ -15,7 +15,7 @@ <script id="add-recipient-tmpl" type="text/x-magento-template"> <div class="actions-toolbar"> <div class="secondary"> - <button type="button" id="btn-remove<%= data._index_ %>" class="action remove" + <button type="button" id="btn-remove<%- data._index_ %>" class="action remove" title="<?php echo $block->escapeJsQuote(__('Remove Recipent')) ?>"> <span><?php echo $block->escapeJsQuote(__('Remove')) ?></span> </button> @@ -23,18 +23,18 @@ </div> <fieldset class="fieldset"> <div class="field name required"> - <label for="recipients-name<%= data._index_ %>" class="label"><span><?php echo __('Name')?></span></label> + <label for="recipients-name<%- data._index_ %>" class="label"><span><?php echo __('Name')?></span></label> <div class="control"> - <input name="recipients[name][<%= data._index_ %>]" type="text" title="<?php echo __('Name') ?>" class="input-text" - id="recipients-name<%= data._index_ %>" data-validate="{required:true}"/> + <input name="recipients[name][<%- data._index_ %>]" type="text" title="<?php echo __('Name') ?>" class="input-text" + id="recipients-name<%- data._index_ %>" data-validate="{required:true}"/> </div> </div> <div class="field email required"> - <label for="recipients-email<%= data._index_ %>" class="label"><span><?php echo __('Email') ?></span></label> + <label for="recipients-email<%- data._index_ %>" class="label"><span><?php echo __('Email') ?></span></label> <div class="control"> - <input name="recipients[email][<%= data._index_ %>]" title="<?php echo __('Email') ?>" - id="recipients-email<%= data._index_ %>" type="email" class="input-text" + <input name="recipients[email][<%- data._index_ %>]" title="<?php echo __('Email') ?>" + id="recipients-email<%- data._index_ %>" type="email" class="input-text" data-validate="{required:true, 'validate-email':true}"/> </div> </div> diff --git a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml index 8a459c5d99ad73cbebabdd1298581ae291be70a7..bf0b417d2bd8adcde2c95cb38c2db26c8be01a5d 100644 --- a/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml +++ b/app/code/Magento/Shipping/view/adminhtml/templates/order/tracking.phtml @@ -64,14 +64,14 @@ require(['prototype'], function(){ <script id="track_row_template" type="text/x-magento-template"> <tr> <td class="col-carrier"> - <select name="tracking[<%= data.index %>][carrier_code]" id="trackingC<%= data.index %>" class="select carrier" disabled="disabled"> + <select name="tracking[<%- data.index %>][carrier_code]" id="trackingC<%- data.index %>" class="select carrier" disabled="disabled"> <?php foreach ($block->getCarriers() as $_code => $_name): ?> <option value="<?php echo $_code ?>"><?php echo $block->escapeHtml($_name) ?></option> <?php endforeach; ?> </select> </td> - <td class="col-title"><input class="input-text number-title" type="text" name="tracking[<%= data.index %>][title]" id="trackingT<%= data.index %>" value="" disabled="disabled" /></td> - <td class="col-number"><input class="input-text required-entry" type="text" name="tracking[<%= data.index %>][number]" id="trackingN<%= data.index %>" value="" disabled="disabled" /></td> + <td class="col-title"><input class="input-text number-title" type="text" name="tracking[<%- data.index %>][title]" id="trackingT<%- data.index %>" value="" disabled="disabled" /></td> + <td class="col-number"><input class="input-text required-entry" type="text" name="tracking[<%- data.index %>][number]" id="trackingN<%- data.index %>" value="" disabled="disabled" /></td> <td class="col-delete last"><a href="#" class="action- delete" onclick="trackingControl.deleteRow(event);return false"><span><?php echo __('Delete') ?></span></a></td> </tr> </script> diff --git a/app/code/Magento/Store/view/base/web/templates/filter/store/item.html b/app/code/Magento/Store/view/base/web/templates/filter/store/item.html index eb150edb32f0647dffbbbfcf7eef64758b412556..c14bb1f3b37c07e1aef319099dab6b77748e6c82 100644 --- a/app/code/Magento/Store/view/base/web/templates/filter/store/item.html +++ b/app/code/Magento/Store/view/base/web/templates/filter/store/item.html @@ -5,7 +5,7 @@ */ --> <!-- ko ifnot: 'items' in option --> - <option data-bind="attr: { label: option.label, value: option.value }"></option> + <option data-bind="attr: { label: option.label, value: option.value }, text: option.label"></option> <!-- /ko --> <!-- ko if: 'items' in option --> <optgroup data-bind="attr: { label: option.label }"></optgroup> diff --git a/app/code/Magento/Theme/Block/Html/Topmenu.php b/app/code/Magento/Theme/Block/Html/Topmenu.php index 5588cbbd6241c96bb854328f5ef1ce76cbcfa7d4..0c2707ab477af2d3ab83b1f8923a81279b228dc5 100644 --- a/app/code/Magento/Theme/Block/Html/Topmenu.php +++ b/app/code/Magento/Theme/Block/Html/Topmenu.php @@ -149,7 +149,7 @@ class Topmenu extends Template implements IdentityInterface $colStops = $this->_columnBrake($child->getChildren(), $limit); } - $html .= '<ul class="level' . $childLevel . '">'; + $html .= '<ul class="level' . $childLevel . ' submenu">'; $html .= $this->_getHtml($child, $childrenWrapClass, $limit, $colStops); $html .= '</ul>'; diff --git a/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml index c30c20621a55d0ae499550ca08fa9420d6b29681..abf12c73a6175da7bbbc2e323bedd8cafca1f799 100644 --- a/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml +++ b/app/code/Magento/Theme/view/adminhtml/templates/browser/content/uploader.phtml @@ -16,8 +16,8 @@ </span> <div class="clear"></div> <script id="<?php echo $block->getHtmlId() ?>-template" type="text/x-magento-template"> - <div id="<%= data.id %>" class="file-row"> - <span class="file-info"><%= data.name %> (<%= data.size %>)</span> + <div id="<%- data.id %>" class="file-row"> + <span class="file-info"><%- data.name %> (<%- data.size %>)</span> <div class="progressbar-container"> <div class="progressbar upload-progress" style="width: 0%;"></div> </div> diff --git a/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml b/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml index ca432b1c21343c875608ee697352cf2b46fe332c..65788230276d58d3017169553972d7a84fb1198f 100644 --- a/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml +++ b/app/code/Magento/Theme/view/adminhtml/templates/tabs/fieldset/js.phtml @@ -9,8 +9,8 @@ <div id="js-file-uploader" class="uploader"> </div> <script id="js-file-uploader-template" type="text/x-magento-template"> - <div id="<%= data.id %>" class="file-row"> - <span class="file-info"><%= data.name %> (<%= data.size %>)</span> + <div id="<%- data.id %>" class="file-row"> + <span class="file-info"><%- data.name %> (<%- data.size %>)</span> <div class="progressbar-container"> <div class="progressbar upload-progress" style="width: 0%;"></div> </div> @@ -20,21 +20,21 @@ <script id="js-uploaded-file-template" type="text/x-magento-template"> <input class="up" type="button" value=""> <input class="down" type="button" value=""> - <input type="hidden" name="js_order[<%= data.id %>]" value="1"> + <input type="hidden" name="js_order[<%- data.id %>]" value="1"> <div class="js-file"> - <%= data.name %> + <%- data.name %> <div class="remove-js"> <input type="checkbox" - id="remove_js_files_<%= data.id %>" + id="remove_js_files_<%- data.id %>" name="js_removed_files[]" - value="<%= data.id %>" /> - <label for="remove_js_files_<%= data.id %>"><?php echo __('Remove') ?></label> + value="<%- data.id %>" /> + <label for="remove_js_files_<%- data.id %>"><?php echo __('Remove') ?></label> </div> </div> - <input type="hidden" name="js_uploaded_files[]" value="<%= data.temporary %>" /> + <input type="hidden" name="js_uploaded_files[]" value="<%- data.temporary %>" /> </script> <ul id="js-files-container" class="js-files-container ui-sortable" ></ul> diff --git a/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml index d2a5974bb335b1521d2595cb9dc2dd7abbe32b90..328a33e5c3f5e2bb13ab9dbec46944250c6485bd 100644 --- a/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml +++ b/app/code/Magento/Translation/view/adminhtml/templates/translate_inline.phtml @@ -13,43 +13,43 @@ <link rel="stylesheet" type="text/css" href="<?php echo $block->getViewFileUrl('mage/translate-inline.css') ?>"/> <script id="translate-inline-icon" type="text/x-magento-template"> - <img src="<%= data.img %>" height="16" width="16" class="translate-edit-icon"> + <img src="<%- data.img %>" height="16" width="16" class="translate-edit-icon"> </script> <script id="translate-form-template" type="text/x-magento-template"> - <form id="<%= data.id %>"> + <form id="<%- data.id %>"> <% _.each(data.items, function(item, i) { %> <div class="magento_table_container"><table cellspacing="0"> <% _.each(item, function(value, index) { %> <tr> - <th class="label" style="text-transform: capitalize;"><%= index %>:</th> - <td class="value"><%= value %></td> + <th class="label" style="text-transform: capitalize;"><%- index %>:</th> + <td class="value"><%- value %></td> </tr> <% }); %> <tr> <th class="label"> - <label for="perstore_<%= i %>">Store View Specific:</label> + <label for="perstore_<%- i %>">Store View Specific:</label> </th> <td class="value"> - <input id="perstore_<%= i %>" name="translate[<%= i %>][perstore]" type="checkbox" value="1"/> + <input id="perstore_<%- i %>" name="translate[<%- i %>][perstore]" type="checkbox" value="1"/> </td> </tr> <tr> <th class="label"> - <label for="custom_<%= i %>">Custom:</label> + <label for="custom_<%- i %>">Custom:</label> </th> <td class="value"> - <input name="translate[<%= i %>][original]" type="hidden" value="<%= data.escape(item.original) %>"/> - <input id="custom_<%= i %>" - name="translate[<%= i %>][custom]" + <input name="translate[<%- i %>][original]" type="hidden" value="<%- data.escape(item.original) %>"/> + <input id="custom_<%- i %>" + name="translate[<%- i %>][custom]" class="input-text" - value="<%= data.escape(item.translated) %>" /> + value="<%- data.escape(item.translated) %>" /> </td> </tr> </table></div> <% }); %> </form> <% if (data.message) { %> - <p class="a-center accent"><%= data.message %></p> + <p class="a-center accent"><%- data.message %></p> <% } %> </script> diff --git a/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml b/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml index 2eb2ac3e8aeedc3faa73f48e8a0b18cc30b97d87..d1c3ce3fc0795cc4bfb9dc89099c70b305f36fc4 100644 --- a/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml +++ b/app/code/Magento/Translation/view/frontend/templates/translate_inline.phtml @@ -13,37 +13,37 @@ <link rel="stylesheet" type="text/css" href="<?php echo $block->getViewFileUrl('mage/translate-inline.css') ?>"/> <script id="translate-inline-icon" type="text/x-magento-template"> - <img src="<%= data.img %>" height="16" width="16" class="translate-edit-icon"> + <img src="<%- data.img %>" height="16" width="16" class="translate-edit-icon"> </script> <script id="translate-form-template" type="text/x-magento-template"> - <form id="<%= data.id %>"> + <form id="<%- data.id %>"> <% _.each(data.items, function(item, i) { %> <div class="magento_table_container"> <table cellspacing="0"> <% _.each(item, function(value, index) { %> <tr> - <th class="label" style="text-transform: capitalize;"><%= index %>:</th> - <td class="value"><%= value %></td> + <th class="label" style="text-transform: capitalize;"><%- index %>:</th> + <td class="value"><%- value %></td> </tr> <% }); %> <tr> <th class="label"> - <label for="perstore_<%= i %>">Store View Specific:</label> + <label for="perstore_<%- i %>">Store View Specific:</label> </th> <td class="value"> - <input id="perstore_<%= i %>" name="translate[<%= i %>][perstore]" type="checkbox" value="1"/> + <input id="perstore_<%- i %>" name="translate[<%- i %>][perstore]" type="checkbox" value="1"/> </td> </tr> <tr> <th class="label"> - <label for="custom_<%= i %>">Custom:</label> + <label for="custom_<%- i %>">Custom:</label> </th> <td class="value"> - <input name="translate[<%= i %>][original]" type="hidden" value="<%= data.escape(item.original) %>"/> - <input id="custom_<%= i %>" - name="translate[<%= i %>][custom]" + <input name="translate[<%- i %>][original]" type="hidden" value="<%- data.escape(item.original) %>"/> + <input id="custom_<%- i %>" + name="translate[<%- i %>][custom]" class="input-text" - value="<%= data.escape(item.translated) %>" /> + value="<%- data.escape(item.translated) %>" /> </td> </tr> </table> @@ -51,7 +51,7 @@ <% }); %> </form> <% if (data.message) { %> - <p class="a-center accent"><%= data.message %></p> + <p class="a-center accent"><%- data.message %></p> <% } %> </script> diff --git a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml index 514906a84d00ff47e4d92a7c496fc691cf4fc4b4..6208eb2f551cfd9d1178a5ff0ab87495c9e14ef4 100644 --- a/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml +++ b/app/code/Magento/Weee/view/adminhtml/templates/renderer/tax.phtml @@ -48,9 +48,9 @@ $data = ['fptAttribute' => [ </div> <script data-role="row-template" type="text/x-magento-template"> - <tr id="<?php echo $block->getElement()->getHtmlId() ?>_weee_tax_row_<%= data.index %>" data-role="fpt-item-row"> + <tr id="<?php echo $block->getElement()->getHtmlId() ?>_weee_tax_row_<%- data.index %>" data-role="fpt-item-row"> <td class="col-website" <?php if (!$block->isMultiWebsites()): ?>style="display: none"<?php endif; ?>> - <select name="<?php echo $block->getElement()->getName() ?>[<%= data.index %>][website_id]" + <select name="<?php echo $block->getElement()->getName() ?>[<%- data.index %>][website_id]" class="<?php echo $block->getElement()->getClass() ?> website required-entry" data-role="select-website"> <?php foreach ($block->getWebsites() as $_websiteId => $_info): ?> <option value="<?php echo $_websiteId ?>"><?php echo $_info['name'] ?><?php if (!empty($_info['currency'])): ?>[<?php echo $_info['currency'] ?>]<?php endif; ?></option> @@ -58,26 +58,26 @@ $data = ['fptAttribute' => [ </select> </td> <td class="col-country"> - <select id="<?php echo $block->getElement()->getName() ?>_weee_tax_row_<%= data.index %>_country" - name="<?php echo $block->getElement()->getName() ?>[<%= data.index %>][country]" + <select id="<?php echo $block->getElement()->getName() ?>_weee_tax_row_<%- data.index %>_country" + name="<?php echo $block->getElement()->getName() ?>[<%- data.index %>][country]" class="<?php echo $block->getElement()->getClass() ?> country required-entry" data-role="select-country"> <?php foreach ($block->getCountries() as $_country): ?> <option value="<?php echo $_country['value'] ?>"><?php echo htmlspecialchars($_country['label']) ?></option> <?php endforeach ?> </select> - <select id="<?php echo $block->getElement()->getName() ?>_weee_tax_row_<%= data.index %>_state" - name="<?php echo $block->getElement()->getName() ?>[<%= data.index %>][state]" + <select id="<?php echo $block->getElement()->getName() ?>_weee_tax_row_<%- data.index %>_state" + name="<?php echo $block->getElement()->getName() ?>[<%- data.index %>][state]" class="<?php echo $block->getElement()->getClass() ?> state" disabled="" data-role="select-state"> <option value="0">*</option> </select> </td> <td class="col-tax"> - <input name="<?php echo $block->getElement()->getName() ?>[<%= data.index %>][price]" + <input name="<?php echo $block->getElement()->getName() ?>[<%- data.index %>][price]" class="<?php echo $block->getElement()->getClass() ?> required-entry validate-greater-than-zero" - type="text" value="<%= data.value %>"/> + type="text" value="<%- data.value %>"/> </td> <td class="col-action"> - <input name="<?php echo $block->getElement()->getName() ?>[<%= data.index %>][delete]" class="delete" type="hidden" value="" data-role="delete-fpt-item"/> + <input name="<?php echo $block->getElement()->getName() ?>[<%- data.index %>][delete]" class="delete" type="hidden" value="" data-role="delete-fpt-item"/> <?php echo $block->getChildHtml('delete_button') ?> </td> </tr> diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 9e879eb5c447417f2135c7c26d6682e8e8b02df2..367b9388e712658be041342d61c1c4983780e87d 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -130,13 +130,13 @@ class Layout extends \Magento\Backend\Block\Template implements \Magento\Framewo $selectBlock = $this->getLayout()->createBlock( 'Magento\Framework\View\Element\Html\Select' )->setName( - 'widget_instance[<%= data.id %>][page_group]' + 'widget_instance[<%- data.id %>][page_group]' )->setId( - 'widget_instance[<%= data.id %>][page_group]' + 'widget_instance[<%- data.id %>][page_group]' )->setClass( 'required-entry page_group_select select' )->setExtraParams( - "onchange=\"WidgetInstance.displayPageGroup(this.value+\'_<%= data.id %>\')\"" + "onchange=\"WidgetInstance.displayPageGroup(this.value+\'_<%- data.id %>\')\"" )->setOptions( $this->_getDisplayOnOptions() ); @@ -244,7 +244,7 @@ class Layout extends \Magento\Backend\Block\Template implements \Magento\Framewo $chooserBlock = $this->getLayout()->createBlock( 'Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\Layout' )->setName( - 'widget_instance[<%= data.id %>][pages][layout_handle]' + 'widget_instance[<%- data.id %>][pages][layout_handle]' )->setId( 'layout_handle' )->setClass( @@ -270,7 +270,7 @@ class Layout extends \Magento\Backend\Block\Template implements \Magento\Framewo $chooserBlock = $this->getLayout()->createBlock( 'Magento\Widget\Block\Adminhtml\Widget\Instance\Edit\Chooser\DesignAbstraction' )->setName( - 'widget_instance[<%= data.id %>][page_layouts][layout_handle]' + 'widget_instance[<%- data.id %>][page_layouts][layout_handle]' )->setId( 'layout_handle' )->setClass( diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php index b472b456cb83fe44902b485b11b68d9e0dbd78ab..e713d016d789da9625a1c7fd68e66a7dc6d671fe 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php @@ -170,7 +170,7 @@ class Settings extends \Magento\Backend\Block\Widget\Form\Generic implements { return $this->getUrl( 'adminhtml/*/*', - ['_current' => true, 'code' => '<%= data.code %>', 'theme_id' => '<%= data.theme_id %>'] + ['_current' => true, 'code' => '<%- data.code %>', 'theme_id' => '<%- data.theme_id %>'] ); } diff --git a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml index d7c9156e1abb285a6e91be4d568dc8af08ba4679..2c3de7069e91977efdb6b1002029a42df2d56fbd 100644 --- a/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml +++ b/app/code/Magento/Widget/view/adminhtml/templates/instance/edit/layout.phtml @@ -24,9 +24,9 @@ require([ //<![CDATA[ -var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="page_group_container_<%= data.id %>">'+ +var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id="page_group_container_<%- data.id %>">'+ '<div class="fieldset-wrapper-title">'+ - '<label for="widget_instance[<%= data.id %>][page_group]">Display on <span class="required">*</span></label>'+ + '<label for="widget_instance[<%- data.id %>][page_group]">Display on <span class="required">*</span></label>'+ '<?php echo $block->getDisplayOnSelectHtml(); ?>'+ '<div class="actions">'+ <?php echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getRemoveLayoutButtonHtml()) ?> + @@ -34,10 +34,10 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id=" '</div>'+ '<div class="fieldset-wrapper-content">'+ <?php foreach ($block->getDisplayOnContainers() as $container): ?> - '<div class="no-display <?php echo $container['code'] ?> group_container" id="<?php echo $container['name'] ?>_<%= data.id %>">'+ - '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>]" />'+ - '<input disabled="disabled" type="hidden" name="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>][page_id]" value="<%= data.page_id %>" />'+ - '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>][layout_handle]" value="<?php echo $container['layout_handle'] ?>" />'+ + '<div class="no-display <?php echo $container['code'] ?> group_container" id="<?php echo $container['name'] ?>_<%- data.id %>">'+ + '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>]" />'+ + '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>][page_id]" value="<%- data.page_id %>" />'+ + '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>][layout_handle]" value="<?php echo $container['layout_handle'] ?>" />'+ '<table cellspacing="0" class="data-table">'+ '<col width="200" />'+ '<thead>'+ @@ -50,10 +50,10 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id=" '<tbody>'+ '<tr>'+ '<td>'+ - '<input disabled="disabled" type="radio" class="radio for_all" id="all_<?php echo $container['name'] ?>_<%= data.id %>" name="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>][for]" value="all" onclick="WidgetInstance.togglePageGroupChooser(this)" checked="checked" /> '+ - '<label for="all_<?php echo $container['name'] ?>_<%= data.id %>"><?php echo $block->escapeJsQuote(__('All')) ?></label><br />'+ - '<input disabled="disabled" type="radio" class="radio for_specific" id="specific_<?php echo $container['name'] ?>_<%= data.id %>" name="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>][for]" value="specific" onclick="WidgetInstance.togglePageGroupChooser(this)" /> '+ - '<label for="specific_<?php echo $container['name'] ?>_<%= data.id %>"><?php echo $block->escapeJsQuote(__('Specific %1', $container['label'])) ?></label>'+ + '<input disabled="disabled" type="radio" class="radio for_all" id="all_<?php echo $container['name'] ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>][for]" value="all" onclick="WidgetInstance.togglePageGroupChooser(this)" checked="checked" /> '+ + '<label for="all_<?php echo $container['name'] ?>_<%- data.id %>"><?php echo $block->escapeJsQuote(__('All')) ?></label><br />'+ + '<input disabled="disabled" type="radio" class="radio for_specific" id="specific_<?php echo $container['name'] ?>_<%- data.id %>" name="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>][for]" value="specific" onclick="WidgetInstance.togglePageGroupChooser(this)" /> '+ + '<label for="specific_<?php echo $container['name'] ?>_<%- data.id %>"><?php echo $block->escapeJsQuote(__('Specific %1', $container['label'])) ?></label>'+ '</td>'+ '<td>'+ '<div class="block_reference_container">'+ @@ -68,15 +68,15 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id=" '</tr>'+ '</tbody>'+ '</table>'+ - '<div class="no-display chooser_container" id="<?php echo $container['name'] ?>_ids_<%= data.id %>">'+ - '<input disabled="disabled" type="hidden" class="is_anchor_only" name="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>][is_anchor_only]" value="<?php echo $container['is_anchor_only'] ?>" />'+ - '<input disabled="disabled" type="hidden" class="product_type_id" name="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>][product_type_id]" value="<?php echo $container['product_type_id'] ?>" />'+ + '<div class="no-display chooser_container" id="<?php echo $container['name'] ?>_ids_<%- data.id %>">'+ + '<input disabled="disabled" type="hidden" class="is_anchor_only" name="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>][is_anchor_only]" value="<?php echo $container['is_anchor_only'] ?>" />'+ + '<input disabled="disabled" type="hidden" class="product_type_id" name="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>][product_type_id]" value="<?php echo $container['product_type_id'] ?>" />'+ '<p>' + - '<input disabled="disabled" type="text" class="input-text entities" name="widget_instance[<%= data.id %>][<?php echo $container['name'] ?>][entities]" value="<%= data.<?php echo $container['name'] ?>_entities %>" readonly="readonly" /> ' + - '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?php echo $container['code'] ?>\', \'<?php echo $container['name'] ?>_ids_<%= data.id %>\')" title="<?php echo $block->escapeJsQuote(__('Open Chooser')) ?>">' + + '<input disabled="disabled" type="text" class="input-text entities" name="widget_instance[<%- data.id %>][<?php echo $container['name'] ?>][entities]" value="<%- data.<?php echo $container['name'] ?>_entities %>" readonly="readonly" /> ' + + '<a class="widget-option-chooser" href="javascript:void(0)" onclick="WidgetInstance.displayEntityChooser(\'<?php echo $container['code'] ?>\', \'<?php echo $container['name'] ?>_ids_<%- data.id %>\')" title="<?php echo $block->escapeJsQuote(__('Open Chooser')) ?>">' + '<img src="<?php echo $block->getViewFileUrl('images/rule_chooser_trigger.gif') ?>" alt="<?php echo $block->escapeJsQuote(__('Open Chooser')); ?>" />' + '</a> ' + - '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?php echo $container['name'] ?>_ids_<%= data.id %>\')" title="<?php echo $block->escapeJsQuote(__('Apply')); ?>">' + + '<a href="javascript:void(0)" onclick="WidgetInstance.hideEntityChooser(\'<?php echo $container['name'] ?>_ids_<%- data.id %>\')" title="<?php echo $block->escapeJsQuote(__('Apply')); ?>">' + '<img src="<?php echo $block->getViewFileUrl('images/rule_component_apply.gif') ?>" alt="<?php echo $block->escapeJsQuote(__('Apply')); ?>" />' + '</a>' + '</p>'+ @@ -84,11 +84,11 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id=" '</div>'+ '</div>'+ <?php endforeach; ?> -'<div class="no-display all_pages group_container" id="all_pages_<%= data.id %>">'+ - '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%= data.id %>][all_pages]" />'+ - '<input disabled="disabled" type="hidden" name="widget_instance[<%= data.id %>][all_pages][page_id]" value="<%= data.page_id %>" />'+ - '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%= data.id %>][all_pages][layout_handle]" value="default" />'+ - '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%= data.id %>][all_pages][for]" value="all" />'+ +'<div class="no-display all_pages group_container" id="all_pages_<%- data.id %>">'+ + '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][all_pages]" />'+ + '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][all_pages][page_id]" value="<%- data.page_id %>" />'+ + '<input disabled="disabled" type="hidden" class="layout_handle_pattern" name="widget_instance[<%- data.id %>][all_pages][layout_handle]" value="default" />'+ + '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][all_pages][for]" value="all" />'+ '<table cellspacing="0" class="data-table">'+ '<col width="200" />'+ '<thead>'+ @@ -115,10 +115,10 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id=" '</tbody>'+ '</table>'+ '</div>'+ -'<div class="no-display ignore-validate pages group_container" id="pages_<%= data.id %>">'+ - '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%= data.id %>][pages]" />'+ - '<input disabled="disabled" type="hidden" name="widget_instance[<%= data.id %>][pages][page_id]" value="<%= data.page_id %>" />'+ - '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%= data.id %>][pages][for]" value="all" />'+ +'<div class="no-display ignore-validate pages group_container" id="pages_<%- data.id %>">'+ + '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][pages]" />'+ + '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][pages][page_id]" value="<%- data.page_id %>" />'+ + '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][pages][for]" value="all" />'+ '<table cellspacing="0" class="data-table">'+ '<col width="200" />'+ '<thead>'+ @@ -146,10 +146,10 @@ var pageGroupTemplate = '<div class="fieldset-wrapper page_group_container" id=" '</tbody>'+ '</table>'+ '</div>'+ -'<div class="no-display ignore-validate pages group_container" id="page_layouts_<%= data.id %>">'+ - '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%= data.id %>][page_layouts]" />'+ - '<input disabled="disabled" type="hidden" name="widget_instance[<%= data.id %>][page_layouts][page_id]" value="<%= data.page_id %>" />'+ - '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%= data.id %>][page_layouts][for]" value="all" />'+ +'<div class="no-display ignore-validate pages group_container" id="page_layouts_<%- data.id %>">'+ + '<input disabled="disabled" type="hidden" class="container_name" name="__[container_name]" value="widget_instance[<%- data.id %>][page_layouts]" />'+ + '<input disabled="disabled" type="hidden" name="widget_instance[<%- data.id %>][page_layouts][page_id]" value="<%- data.page_id %>" />'+ + '<input disabled="disabled" type="hidden" class="for_all" name="widget_instance[<%- data.id %>][page_layouts][for]" value="all" />'+ '<table cellspacing="0" class="data-table">'+ '<col width="200" />'+ '<thead>'+ diff --git a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml index bbd6e63589e08eb13901d6d12e858b62f108d21f..5a5133f980e51888c900ff3c31f864540c1b1cb4 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/item/configure/addto.phtml @@ -22,15 +22,10 @@ </a> <?php endif; ?> </div> -<script> - require([ - "jquery", - "mage/mage" - ], function(jQuery){ - - jQuery('body').mage('addToWishlist', - <?php echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode(['productType' => $_product->getTypeId()])?> - ); - - }); -</script> +<script type="text/x-magento-init"> + { + "body": { + "addToWishlist": <?php echo $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode(['productType' => $_product->getTypeId()])?> + } + } +</script> \ No newline at end of file diff --git a/app/code/Magento/Wishlist/view/frontend/templates/view.phtml b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml index 836074bbae2f72122ce7c0e3dad96adc1b6b361f..52ea6d9490f7355b7ae6594bd4ebebbc3250a910 100644 --- a/app/code/Magento/Wishlist/view/frontend/templates/view.phtml +++ b/app/code/Magento/Wishlist/view/frontend/templates/view.phtml @@ -47,17 +47,17 @@ </div> </form> <script id="form-tmpl" type="text/x-magento-template"> - <form id="wishlist-hidden-form" method="post" action="<%= data.url %>" class="no-display"> + <form id="wishlist-hidden-form" method="post" action="<%- data.url %>" class="no-display"> <% if (data.qty) { %> - <input name="qty" value="<%= data.qty %>"> + <input name="qty" value="<%- data.qty %>"> <% } %> <% if (data.item) { %> - <input name="item" value="<%= data.item %>"> + <input name="item" value="<%- data.item %>"> <% } %> <% if (data.entity) { %> - <input name="entity" value="<%= data.entity %>"> + <input name="entity" value="<%- data.entity %>"> <% } %> </form> </script> diff --git a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php index 6c3e11540c9dd82222f27e97d6a938bfb39ed05a..c8d22ae1aae76d807cfee729e2914da97e8eeaca 100644 --- a/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php +++ b/dev/tests/functional/tests/app/Magento/Backend/Test/Block/Widget/Grid.php @@ -46,7 +46,7 @@ abstract class Grid extends Block * * @var string */ - protected $resetButton = '[title="Reset Filter"][class*=action]'; + protected $resetButton = '.action-reset'; /** * The first row in grid. For this moment we suggest that we should strictly define what we are going to search diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php index 957a68bbdbd9db4bdcc8e502f60e75bb78dab9cb..43f63adca927c677227634203b5602c16eb19034 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Options/Type/SelectTest.php @@ -22,7 +22,7 @@ class SelectTest extends \PHPUnit_Framework_TestCase 'select' ); $html = $block->getPriceTypeSelectHtml(); - $this->assertContains('select_<%= data.select_id %>', $html); - $this->assertContains('[<%= data.select_id %>]', $html); + $this->assertContains('select_<%- data.select_id %>', $html); + $this->assertContains('[<%- data.select_id %>]', $html); } } diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php index ca4fae8a6d121000d15c127353a47c89eb3d8c30..a11e5dfd4549f0fe9a3e29236d36ce6fa88f6b41 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Controller/Adminhtml/Product/NewActionTest.php @@ -28,11 +28,11 @@ class NewActionTest extends \Magento\Backend\Utility\Controller ); $lines = explode(PHP_EOL, $this->getResponse()->getBody()); foreach ($lines as $index => $line) { - if ($line && strpos($line, 'name="product[group_price][<%= data.index %>][cust_group]"') !== false) { + if ($line && strpos($line, 'name="product[group_price][<%- data.index %>][cust_group]"') !== false) { break; } } - $this->assertContains('name="product[group_price][<%= data.index %>][cust_group]"', $lines[$index]); + $this->assertContains('name="product[group_price][<%- data.index %>][cust_group]"', $lines[$index]); $this->assertContains('<option value="0">NOT LOGGED IN</option>', $lines[$index + 1]); $this->assertContains('<option value="1">General</option>', $lines[$index + 2]); $this->assertContains('<option value="2">Wholesale</option>', $lines[$index + 3]); diff --git a/lib/web/css/source/lib/_navigation.less b/lib/web/css/source/lib/_navigation.less index bc3b5b512b3df549677b19542d568d1bb832f050..3da4c94017a3f2fbab5bf17ee25cef507fce5a87 100644 --- a/lib/web/css/source/lib/_navigation.less +++ b/lib/web/css/source/lib/_navigation.less @@ -79,7 +79,7 @@ .css(border-bottom, @_nav-level0-item-border); } } - .ui-menu:not(:first-child) { + .submenu:not(:first-child) { .css(background, @_submenu-background-color); .css(border, @_submenu-border); .css(font-size, @_submenu-font-size); @@ -241,10 +241,11 @@ &.parent:hover > .submenu { overflow: visible !important; } - .ui-menu { + .submenu { .css(font-size, @_submenu-font-size); .css(font-weight, @_submenu-font-weight); .css(min-width, @_submenu-min-width); + display: none; padding: 0; margin: 0 !important; position: absolute; @@ -284,7 +285,7 @@ .css(color, @_submenu-item-color-active); .css(text-decoration, @_submenu-item-text-decoration-active); } - .ui-menu { + .submenu { top: 0 !important; left: 100% !important; } diff --git a/lib/web/mage/adminhtml/grid.js b/lib/web/mage/adminhtml/grid.js index 9509684882687e9ebfdb793ed5920f4873119982..62ede73c5c2fc8e94c6c32f538ba56447e9018db 100644 --- a/lib/web/mage/adminhtml/grid.js +++ b/lib/web/mage/adminhtml/grid.js @@ -372,7 +372,7 @@ varienGridMassaction.prototype = { useSelectAll: false, currentItem: false, lastChecked: { left: false, top: false, checkbox: false }, - fieldTemplate: mageTemplate('<input type="hidden" name="<%= name %>" value="<%= value %>" />'), + fieldTemplate: mageTemplate('<input type="hidden" name="<%- name %>" value="<%- value %>" />'), initialize: function (containerId, grid, checkedValues, formFieldNameInternal, formFieldName) { this.setOldCallback('row_click', grid.rowClickCallback); this.setOldCallback('init', grid.initCallback); diff --git a/lib/web/mage/backend/notification.js b/lib/web/mage/backend/notification.js index 99f898f5806942798e0156035948b6b80e44a64e..eb688214155efc8314dabc25cba88f44bfd839e8 100644 --- a/lib/web/mage/backend/notification.js +++ b/lib/web/mage/backend/notification.js @@ -13,7 +13,7 @@ define([ $.widget('mage.notification', { options: { templates: { - global: '<div class="messages"><div class="message <%= if (data.error) { %>error<% } %>"><div><%= data.message %></div></div></div>' + global: '<div class="messages"><div class="message <%- if (data.error) { %>error<% } %>"><div><%- data.message %></div></div></div>' } }, diff --git a/lib/web/mage/backend/suggest.js b/lib/web/mage/backend/suggest.js index 9617c1d7df59af842aaba5f9b06c4477f7737a5c..70dd802284562e8d43d54be0e28b5d38f7e27ac2 100644 --- a/lib/web/mage/backend/suggest.js +++ b/lib/web/mage/backend/suggest.js @@ -28,18 +28,18 @@ widgetEventPrefix: 'suggest', options: { template: '<% if (data.items.length) { %><% if (!data.term && !data.allShown() && data.recentShown()) { %>' + - '<h5 class="title"><%= data.recentTitle %></h5>' + + '<h5 class="title"><%- data.recentTitle %></h5>' + '<% } %>' + '<ul data-mage-init=\'{"menu":[]}\'>' + '<% _.each(data.items, function(value){ %>' + '<% if (!data.itemSelected(value)) { %><li <%= data.optionData(value) %>>' + - '<a href="#"><%= value.label %></a></li><% } %>' + + '<a href="#"><%- value.label %></a></li><% } %>' + '<% }); %>' + '<% if (!data.term && !data.allShown() && data.recentShown()) { %>' + '<li data-mage-init=\'{"actionLink":{"event":"showAll"}}\' class="show-all">' + - '<a href="#"><%= data.showAllTitle %></a></li>' + + '<a href="#"><%- data.showAllTitle %></a></li>' + '<% } %>' + - '</ul><% } else { %><span class="mage-suggest-no-records"><%= data.noRecordsText %></span><% } %>', + '</ul><% } else { %><span class="mage-suggest-no-records"><%- data.noRecordsText %></span><% } %>', minLength: 1, /** * @type {(String|Array)} @@ -776,7 +776,7 @@ options: { multiSuggestWrapper: '<ul class="mage-suggest-choices">' + '<li class="mage-suggest-search-field" data-role="parent-choice-element"><label class="mage-suggest-search-label"></label></li></ul>', - choiceTemplate: '<li class="mage-suggest-choice button"><div><%= text %></div>' + + choiceTemplate: '<li class="mage-suggest-choice button"><div><%- text %></div>' + '<span class="mage-suggest-choice-close" tabindex="-1" ' + 'data-mage-init=\'{"actionLink":{"event":"removeOption"}}\'></span></li>', selectedClass: 'mage-suggest-selected' diff --git a/lib/web/mage/backend/tree-suggest.js b/lib/web/mage/backend/tree-suggest.js index 19ec82c2a1f6148e82d264a52246634162f8a270..794e9638ff6e0e6084e60ccb4ef86591483fa7ae 100644 --- a/lib/web/mage/backend/tree-suggest.js +++ b/lib/web/mage/backend/tree-suggest.js @@ -113,7 +113,7 @@ '<ul>' + '<% _.each(data.items, function(value) { %>' + '<li class="<% if (data.itemSelected(value)) { %>mage-suggest-selected<% } %><% if (value.is_active == 0) { %> mage-suggest-not-active<% } %>">' + - '<a href="#" <%= data.optionData(value) %>><%= value.label %></a>' + + '<a href="#" <%= data.optionData(value) %>><%- value.label %></a>' + '<% if (value.children && value.children.length) { %>' + '<%= data.renderTreeLevel(value.children) %>' + '<% } %>' + @@ -129,8 +129,8 @@ '<% if (!data.itemSelected(value)) {%>' + '<li <%= data.optionData(value) %>>' + '<a href="#">' + - '<span class="category-label"><%= value.label %></span>' + - '<span class="category-path"><%= value.path %></span>' + + '<span class="category-label"><%- value.label %></span>' + + '<span class="category-path"><%- value.path %></span>' + '</a>' + '</li>' + '<% } %>' + @@ -138,7 +138,7 @@ '</ul>' + '<% } %>' + '<% } else { %>' + - '<span class="mage-suggest-no-records"><%= data.noRecordsText %></span>' + + '<span class="mage-suggest-no-records"><%- data.noRecordsText %></span>' + '<% } %>', controls: { selector: ':ui-menu, :mage-menu, .jstree', diff --git a/lib/web/mage/dataPost.js b/lib/web/mage/dataPost.js index 2ace3bc0a24d39059a9a8a62dc5a012b52db18fa..b7fc0d18eb912afedc07d8425ac436d57d1b8a9d 100644 --- a/lib/web/mage/dataPost.js +++ b/lib/web/mage/dataPost.js @@ -12,9 +12,9 @@ define([ $.widget('mage.dataPost', { options: { - formTemplate: '<form action="<%= data.action %>" method="post">' + formTemplate: '<form action="<%- data.action %>" method="post">' + '<% _.each(data.data, function(value, index) { %>' - + '<input name="<%= index %>" value="<%= value %>">' + + '<input name="<%- index %>" value="<%- value %>">' + '<% }) %></form>', postTrigger: ['a[data-post]', 'button[data-post]', 'span[data-post]'], formKeyInputSelector: 'input[name="form_key"]' diff --git a/lib/web/mage/loader.js b/lib/web/mage/loader.js index 12c75e86554aabf4cf852ebc1fe1bc775b7c565f..b9443094f07201bda215e498f1706ba348a31629 100644 --- a/lib/web/mage/loader.js +++ b/lib/web/mage/loader.js @@ -23,8 +23,8 @@ define([ template: '<div class="loading-mask" data-role="loader">' + '<div class="loader">' + - '<img alt="<%= data.texts.imgAlt %>" src="<%= data.icon %>">' + - '<p><%= data.texts.loaderText %></p>' + + '<img alt="<%- data.texts.imgAlt %>" src="<%- data.icon %>">' + + '<p><%- data.texts.loaderText %></p>' + '</div>' + '</div>' diff --git a/lib/web/mage/loader_old.js b/lib/web/mage/loader_old.js index f2164f998aae5af18008e910e0aa0303b459af8c..86ebce8cd6ac978587d42711834f29be27498c89 100644 --- a/lib/web/mage/loader_old.js +++ b/lib/web/mage/loader_old.js @@ -32,8 +32,8 @@ template: '<div class="loading-mask" data-role="loader">' + '<div class="popup popup-loading">' + '<div class="popup-inner">' + - '<% if (data.icon) { %><img <% if (data.texts.imgAlt) { %>alt="<%= data.texts.imgAlt %>"<% } %> src="<%= data.icon %>"><% } %>' + - '<% if (data.texts.loaderText) { %><%= data.texts.loaderText %><% } %>' + + '<% if (data.icon) { %><img <% if (data.texts.imgAlt) { %>alt="<%- data.texts.imgAlt %>"<% } %> src="<%- data.icon %>"><% } %>' + + '<% if (data.texts.loaderText) { %><%- data.texts.loaderText %><% } %>' + '</div>' + '</div>' + '</div>' diff --git a/lib/web/mage/menu.js b/lib/web/mage/menu.js index 01b4d116ebf4a8d192512003a6cb9e51752092eb..94055ff0a1ddbda398323f9d8e31a9060ac7bfd3 100644 --- a/lib/web/mage/menu.js +++ b/lib/web/mage/menu.js @@ -6,7 +6,8 @@ define([ "jquery", "matchMedia", "jquery/ui", - "jquery/jquery.mobile.custom" + "jquery/jquery.mobile.custom", + "mage/translate" ], function($, mediaCheck){ 'use strict'; @@ -274,7 +275,7 @@ define([ this.categoryLink = $('<a>') .attr('href', categoryUrl) - .text('All '+ category); + .text($.mage.__('All ') + category); this.categoryParent = $('<li>') .addClass('ui-menu-item all-category') @@ -336,9 +337,17 @@ define([ "mouseleave .ui-menu": "collapseAll" }); - var categoryParent = this.element.find('.all-category'); + var categoryParent = this.element.find('.all-category'), + html = $('html'); categoryParent.remove(); + + if (html.hasClass('nav-open')) { + html.removeClass('nav-open'); + setTimeout(function () { + html.removeClass('nav-before-open'); + }, 300); + } }, _delay: function(handler, delay) { @@ -355,7 +364,7 @@ define([ responsiveAction: 'wrap', //option for responsive handling maxItems: null, //option to set max number of menu items container: '#menu', //container to check against navigation length - moreText: 'more', + moreText: $.mage.__('more'), breakpoint: 768 },