Skip to content

Commit 4164cb8

Browse files
MAGETWO-87066: [EngCom Team] Batch 1. Forwardports to 2.3-develop #1282
2 parents d838579 + 8597a73 commit 4164cb8

File tree

10 files changed

+72
-49
lines changed

10 files changed

+72
-49
lines changed

app/code/Magento/Backend/Controller/Adminhtml/Noroute/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function execute()
3434
{
3535
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
3636
$resultPage = $this->resultPageFactory->create();
37-
$resultPage->setStatusHeader(404, '1.1', 'Forbidden');
37+
$resultPage->setStatusHeader(404, '1.1', 'Not Found');
3838
$resultPage->setHeader('Status', '404 File not found');
3939
$resultPage->addHandle('adminhtml_noroute');
4040
return $resultPage;

app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<div class="messages">
8686
<div class="message message-notice notice">
8787
<span
88-
translate="'Search strings are either normal strings or regular exceptions (PCRE). They are matched in the same order as entered.'"></span>
88+
translate="'Search strings are either normal strings or regular expressions (PCRE). They are matched in the same order as entered.'"></span>
8989
<br>
9090
<span
9191
translate="'Examples'"></span>:

app/code/Magento/Checkout/view/frontend/web/js/region-updater.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ define([
206206
regionInput.removeClass('required-entry');
207207
}
208208

209-
regionList.removeClass('required-entry').hide();
209+
regionList.removeClass('required-entry').prop('disabled', 'disabled').hide();
210210
regionInput.show();
211211
label.attr('for', regionInput.attr('id'));
212212
}

app/code/Magento/GoogleOptimizer/view/adminhtml/ui_component/cms_page_form.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@
1313
</settings>
1414
<container name="google_experiment_container" sortOrder="250">
1515
<htmlContent name="html_content">
16-
<block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage" />
16+
<block name="googleOptimizerBlockAdminhtmlFormCmsPage" class="Magento\GoogleOptimizer\Block\Adminhtml\Form\CmsPage">
17+
<arguments>
18+
<argument name="code-entity" xsi:type="string">Magento\GoogleOptimizer\Block\Adminhtml\Cms\Page\EntityCmsPage</argument>
19+
<argument name="form-name" xsi:type="string">cms_page_form</argument>
20+
</arguments>
21+
</block>
1722
</htmlContent>
1823
</container>
1924
</fieldset>

app/code/Magento/Quote/Model/QuoteRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ protected function loadQuote($loadMethod, $loadField, $identifier, array $shared
212212
if ($sharedStoreIds) {
213213
$quote->setSharedStoreIds($sharedStoreIds);
214214
}
215-
$quote->setStoreId($this->storeManager->getStore()->getId())->$loadMethod($identifier);
215+
$quote->$loadMethod($identifier)->setStoreId($this->storeManager->getStore()->getId());
216216
if (!$quote->getId()) {
217217
throw NoSuchEntityException::singleField($loadField, $identifier);
218218
}

app/code/Magento/Sales/Model/Order/Shipment/ItemCreation.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function getOrderItemId()
4343
public function setOrderItemId($orderItemId)
4444
{
4545
$this->orderItemId = $orderItemId;
46+
return $this;
4647
}
4748

4849
/**
@@ -59,6 +60,7 @@ public function getQty()
5960
public function setQty($qty)
6061
{
6162
$this->qty = $qty;
63+
return $this;
6264
}
6365

6466
/**

app/code/Magento/Sales/view/frontend/templates/email/items/invoice/default.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
</td>
3232
<td class="item-qty"><?= /* @escapeNotVerified */ $_item->getQty() * 1 ?></td>
3333
<td class="item-price">
34-
<?= /* @escapeNotVerified */ $block->getItemPrice($_item) ?>
34+
<?= /* @escapeNotVerified */ $block->getItemPrice($_item->getOrderItem()) ?>
3535
</td>
3636
</tr>

app/code/Magento/Search/view/frontend/web/form-mini.js

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -286,46 +286,50 @@ define([
286286
$.getJSON(this.options.url, {
287287
q: value
288288
}, $.proxy(function (data) {
289-
$.each(data, function (index, element) {
290-
var html;
291-
292-
element.index = index;
293-
html = template({
294-
data: element
289+
if (data.length) {
290+
$.each(data, function (index, element) {
291+
var html;
292+
293+
element.index = index;
294+
html = template({
295+
data: element
296+
});
297+
dropdown.append(html);
295298
});
296-
dropdown.append(html);
297-
});
298-
this.responseList.indexList = this.autoComplete.html(dropdown)
299-
.css(clonePosition)
300-
.show()
301-
.find(this.options.responseFieldElements + ':visible');
302-
303-
this._resetResponseList(false);
304-
this.element.removeAttr('aria-activedescendant');
305-
306-
if (this.responseList.indexList.length) {
307-
this._updateAriaHasPopup(true);
308-
} else {
309-
this._updateAriaHasPopup(false);
310-
}
311299

312-
this.responseList.indexList
313-
.on('click', function (e) {
314-
this.responseList.selected = $(e.currentTarget);
315-
this.searchForm.trigger('submit');
316-
}.bind(this))
317-
.on('mouseenter mouseleave', function (e) {
318-
this.responseList.indexList.removeClass(this.options.selectClass);
319-
$(e.target).addClass(this.options.selectClass);
320-
this.responseList.selected = $(e.target);
321-
this.element.attr('aria-activedescendant', $(e.target).attr('id'));
322-
}.bind(this))
323-
.on('mouseout', function (e) {
324-
if (!this._getLastElement() && this._getLastElement().hasClass(this.options.selectClass)) {
325-
$(e.target).removeClass(this.options.selectClass);
326-
this._resetResponseList(false);
327-
}
328-
}.bind(this));
300+
this.responseList.indexList = this.autoComplete.html(dropdown)
301+
.css(clonePosition)
302+
.show()
303+
.find(this.options.responseFieldElements + ':visible');
304+
305+
this._resetResponseList(false);
306+
this.element.removeAttr('aria-activedescendant');
307+
308+
if (this.responseList.indexList.length) {
309+
this._updateAriaHasPopup(true);
310+
} else {
311+
this._updateAriaHasPopup(false);
312+
}
313+
314+
this.responseList.indexList
315+
.on('click', function (e) {
316+
this.responseList.selected = $(e.currentTarget);
317+
this.searchForm.trigger('submit');
318+
}.bind(this))
319+
.on('mouseenter mouseleave', function (e) {
320+
this.responseList.indexList.removeClass(this.options.selectClass);
321+
$(e.target).addClass(this.options.selectClass);
322+
this.responseList.selected = $(e.target);
323+
this.element.attr('aria-activedescendant', $(e.target).attr('id'));
324+
}.bind(this))
325+
.on('mouseout', function (e) {
326+
if (!this._getLastElement() &&
327+
this._getLastElement().hasClass(this.options.selectClass)) {
328+
$(e.target).removeClass(this.options.selectClass);
329+
this._resetResponseList(false);
330+
}
331+
}.bind(this));
332+
}
329333
}, this));
330334
} else {
331335
this._resetResponseList(true);

app/code/Magento/Store/Model/Address/Renderer.php

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
*/
1616
class Renderer
1717
{
18+
const DEFAULT_TEMPLATE = "{{var name}}\n" .
19+
"{{var street_line1}}\n" .
20+
"{{depend street_line2}}{{var street_line2}}\n{{/depend}}" .
21+
"{{depend city}}{{var city}},{{/depend}} {{var region}} {{depend postcode}}{{var postcode}},{{/depend}}\n" .
22+
"{{var country}}";
23+
1824
/**
1925
* @var EventManager
2026
*/
@@ -25,18 +31,26 @@ class Renderer
2531
*/
2632
protected $filterManager;
2733

34+
/**
35+
* @var string
36+
*/
37+
private $template;
38+
2839
/**
2940
* Constructor
3041
*
3142
* @param EventManager $eventManager
3243
* @param FilterManager $filterManager
44+
* @param string $template
3345
*/
3446
public function __construct(
3547
EventManager $eventManager,
36-
FilterManager $filterManager
48+
FilterManager $filterManager,
49+
$template = self::DEFAULT_TEMPLATE
3750
) {
3851
$this->eventManager = $eventManager;
3952
$this->filterManager = $filterManager;
53+
$this->template = $template;
4054
}
4155

4256
/**
@@ -50,9 +64,7 @@ public function format(DataObject $storeInfo, $type = 'html')
5064
{
5165
$this->eventManager->dispatch('store_address_format', ['type' => $type, 'store_info' => $storeInfo]);
5266
$address = $this->filterManager->template(
53-
"{{var name}}\n{{var street_line1}}\n{{depend street_line2}}{{var street_line2}}\n{{/depend}}" .
54-
"{{depend city}}{{var city}},{{/depend}} {{var region}} {{depend postcode}}{{var postcode}},{{/depend}}\n" .
55-
"{{var country}}",
67+
$this->template,
5668
['variables' => $storeInfo->getData()]
5769
);
5870

app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ define([
244244
],
245245
'stripped-min-length': [
246246
function (value, param) {
247-
return $(value).text().length >= param;
247+
return _.isUndefined(value) || value.length === 0 || utils.stripHtml(value).length >= param;
248248
},
249249
$.mage.__('Please enter at least {0} characters')
250250
],

0 commit comments

Comments
 (0)