Skip to content

Commit 99c2b2a

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-92884
2 parents 4e3be0c + 26bac6f commit 99c2b2a

File tree

92 files changed

+1443
-716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+1443
-716
lines changed

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,12 @@
1919
</ul>
2020
</div>
2121

22-
<script>
23-
require([
24-
"jquery",
25-
"Magento_Ui/js/modal/modal"
26-
], function($){
27-
if (this.modal) {
28-
this.modal.html($('[data-role="system_messages_list"]').html());
29-
} else {
30-
this.modal = $('[data-role="system_messages_list"]').modal({
31-
modalClass: 'modal-system-messages ui-popup-message',
32-
type: 'popup',
33-
buttons: []
34-
});
22+
<script type="text/x-magento-init">
23+
{
24+
"[data-role=system_messages_list]": {
25+
"Magento_AdminNotification/js/system/messages/popup": {
26+
class: 'modal-system-messages ui-popup-message'
27+
}
28+
}
3529
}
36-
this.modal.modal('openModal');
37-
});
38-
</script>
30+
</script>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery',
8+
'Magento_Ui/js/modal/modal'
9+
], function ($) {
10+
'use strict';
11+
12+
return function (data, element) {
13+
if (this.modal) {
14+
this.modal.html($(element).html());
15+
} else {
16+
this.modal = $(element).modal({
17+
modalClass: data.class,
18+
type: 'popup',
19+
buttons: []
20+
});
21+
}
22+
this.modal.modal('openModal');
23+
};
24+
});

app/code/Magento/Backend/Controller/Adminhtml/System/Store/DeleteStorePost.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public function execute()
3737
try {
3838
$model->delete();
3939

40-
$this->_eventManager->dispatch('store_delete', ['store' => $model]);
41-
4240
$this->messageManager->addSuccess(__('You deleted the store view.'));
4341
return $redirectResult->setPath('adminhtml/*/');
4442
} catch (\Magento\Framework\Exception\LocalizedException $e) {

app/code/Magento/Backend/Controller/Adminhtml/System/Store/Save.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ private function processWebsiteSave($postData)
4646
*/
4747
private function processStoreSave($postData)
4848
{
49-
$eventName = 'store_edit';
5049
/** @var \Magento\Store\Model\Store $storeModel */
5150
$storeModel = $this->_objectManager->create(\Magento\Store\Model\Store::class);
5251
$postData['store']['name'] = $this->filterManager->removeTags($postData['store']['name']);
@@ -56,7 +55,6 @@ private function processStoreSave($postData)
5655
$storeModel->setData($postData['store']);
5756
if ($postData['store']['store_id'] == '') {
5857
$storeModel->setId(null);
59-
$eventName = 'store_add';
6058
}
6159
$groupModel = $this->_objectManager->create(
6260
\Magento\Store\Model\Group::class
@@ -70,8 +68,6 @@ private function processStoreSave($postData)
7068
);
7169
}
7270
$storeModel->save();
73-
$this->_objectManager->get(\Magento\Store\Model\StoreManager::class)->reinitStores();
74-
$this->_eventManager->dispatch($eventName, ['store' => $storeModel]);
7571
$this->messageManager->addSuccess(__('You saved the store view.'));
7672

7773
return $postData;
@@ -102,7 +98,6 @@ private function processGroupSave($postData)
10298
);
10399
}
104100
$groupModel->save();
105-
$this->_eventManager->dispatch('store_group_save', ['group' => $groupModel]);
106101
$this->messageManager->addSuccess(__('You saved the store.'));
107102

108103
return $postData;

app/code/Magento/Catalog/Block/Product/ProductList/Toolbar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function setCollection($collection)
196196
$this->_collection->addAttributeToSort(
197197
$this->getCurrentOrder(),
198198
$this->getCurrentDirection()
199-
)->addAttributeToSort('entity_id', $this->getCurrentDirection());
199+
);
200200
} else {
201201
$this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
202202
}

app/code/Magento/Catalog/Controller/Adminhtml/Product/Save.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ private function handleImageRemoveError($postData, $productId)
216216
/**
217217
* Do copying data to stores
218218
*
219+
* If the 'copy_from' field is not specified in the input data,
220+
* the store fallback mechanism will automatically take the admin store's default value.
221+
*
219222
* @param array $data
220223
* @param int $productId
221224
* @return void
@@ -227,15 +230,17 @@ protected function copyToStores($data, $productId)
227230
if (isset($data['product']['website_ids'][$websiteId])
228231
&& (bool)$data['product']['website_ids'][$websiteId]) {
229232
foreach ($group as $store) {
230-
$copyFrom = (isset($store['copy_from'])) ? $store['copy_from'] : 0;
231-
$copyTo = (isset($store['copy_to'])) ? $store['copy_to'] : 0;
232-
if ($copyTo) {
233-
$this->_objectManager->create(\Magento\Catalog\Model\Product::class)
234-
->setStoreId($copyFrom)
235-
->load($productId)
236-
->setStoreId($copyTo)
237-
->setCopyFromView(true)
238-
->save();
233+
if (isset($store['copy_from'])) {
234+
$copyFrom = $store['copy_from'];
235+
$copyTo = (isset($store['copy_to'])) ? $store['copy_to'] : 0;
236+
if ($copyTo) {
237+
$this->_objectManager->create(\Magento\Catalog\Model\Product::class)
238+
->setStoreId($copyFrom)
239+
->load($productId)
240+
->setStoreId($copyTo)
241+
->setCopyFromView(true)
242+
->save();
243+
}
239244
}
240245
}
241246
}

app/code/Magento/Catalog/etc/adminhtml/menu.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<add id="Magento_Catalog::catalog_categories" title="Categories" translate="title" module="Magento_Catalog" sortOrder="20" parent="Magento_Catalog::inventory" action="catalog/category/" resource="Magento_Catalog::categories"/>
1313
<add id="Magento_Catalog::catalog_attributes_attributes" title="Product" translate="title" module="Magento_Catalog" sortOrder="30" parent="Magento_Backend::stores_attributes" action="catalog/product_attribute/" resource="Magento_Catalog::attributes_attributes"/>
1414
<add id="Magento_Catalog::catalog_attributes_sets" title="Attribute Set" translate="title" module="Magento_Catalog" sortOrder="40" parent="Magento_Backend::stores_attributes" action="catalog/product_set/" resource="Magento_Catalog::sets"/>
15-
1615
<add id="Magento_Catalog::inventory" title="Inventory" translate="title" module="Magento_Catalog" sortOrder="10" parent="Magento_Catalog::catalog" dependsOnModule="Magento_Catalog" resource="Magento_Catalog::catalog"/>
1716
</menu>
1817
</config>

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\CatalogImportExport\Model\Import\Product\MediaGalleryProcessor;
1111
use Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor;
1212
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
13+
use Magento\CatalogInventory\Api\Data\StockItemInterface;
1314
use Magento\CatalogImportExport\Model\StockItemImporterInterface;
1415
use Magento\Framework\App\Filesystem\DirectoryList;
1516
use Magento\Framework\App\ObjectManager;
@@ -2618,7 +2619,10 @@ private function _setStockUseConfigFieldsValues($rowData)
26182619
{
26192620
$useConfigFields = [];
26202621
foreach ($rowData as $key => $value) {
2621-
$useConfigName = self::INVENTORY_USE_CONFIG_PREFIX . $key;
2622+
$useConfigName = $key === StockItemInterface::ENABLE_QTY_INCREMENTS
2623+
? StockItemInterface::USE_CONFIG_ENABLE_QTY_INC
2624+
: self::INVENTORY_USE_CONFIG_PREFIX . $key;
2625+
26222626
if (isset($this->defaultStockData[$key])
26232627
&& isset($this->defaultStockData[$useConfigName])
26242628
&& !empty($value)

app/code/Magento/Customer/Block/Widget/Dob.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ protected function getFormFilter()
127127
protected function applyOutputFilter($value)
128128
{
129129
$filter = $this->getFormFilter();
130-
if ($filter) {
130+
if ($filter && $value) {
131+
$value = date('Y-m-d', $this->getTime());
131132
$value = $filter->outputFilter($value);
132133
}
133134
return $value;

app/code/Magento/Customer/view/frontend/templates/form/login.phtml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<div class="field email required">
2525
<label class="label" for="email"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
2626
<div class="control">
27-
<input name="login[username]" value="<?= $block->escapeHtmlAttr($block->getUsername()) ?>" <?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?> id="email" type="email" class="input-text" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" data-validate="{required:true, 'validate-email':true}">
27+
<input name="login[username]" value="<?= $block->escapeHtmlAttr($block->getUsername()) ?>" <?php if ($block->isAutocompleteDisabled()): ?> autocomplete="off"<?php endif; ?> id="email" type="email" class="input-text" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}">
2828
</div>
2929
</div>
3030
<div class="field password required">
@@ -43,12 +43,3 @@
4343
</div>
4444
</div>
4545

46-
<script type="text/x-magento-init">
47-
{
48-
".field.email": {
49-
"Magento_Customer/js/trim-username": {
50-
"formSelector": "form.form-login"
51-
}
52-
}
53-
}
54-
</script>

0 commit comments

Comments
 (0)