Skip to content

Commit 69469aa

Browse files
merge magento/2.3-develop into magento-chaika/Chaika-PR-2019-09-03-2.3
2 parents 2977837 + db43c11 commit 69469aa

File tree

30 files changed

+160
-111
lines changed

30 files changed

+160
-111
lines changed

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<section id="advanced" translate="label" type="text" sortOrder="910" showInDefault="0" showInWebsite="0" showInStore="0">
2424
<label>Advanced</label>
2525
<tab>advanced</tab>
26-
<resource>Magento_Backend::advanced</resource>
26+
<resource>Magento_Config::advanced</resource>
2727
<group id="modules_disable_output" translate="label" type="text" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
2828
<label>Disable Modules Output</label>
2929
<frontend_model>Magento\Config\Block\System\Config\Form\Fieldset\Modules\DisableOutput</frontend_model>

app/code/Magento/Braintree/view/frontend/templates/paypal/button.phtml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@
1111
$id = $block->getContainerId() . random_int(0, PHP_INT_MAX);
1212

1313
$config = [
14-
'Magento_Braintree/js/paypal/button' => [
15-
'id' => $id,
16-
'clientToken' => $block->getClientToken(),
17-
'displayName' => $block->getMerchantName(),
18-
'actionSuccess' => $block->getActionSuccess(),
19-
'environment' => $block->getEnvironment()
20-
]
14+
'id' => $id,
15+
'clientToken' => $block->getClientToken(),
16+
'displayName' => $block->getMerchantName(),
17+
'actionSuccess' => $block->getActionSuccess(),
18+
'environment' => $block->getEnvironment()
2119
];
22-
2320
?>
24-
<div data-mage-init='<?= /* @noEscape */ json_encode($config); ?>'
21+
<div data-mage-init='{"Magento_Braintree/js/paypal/button":<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($config) ?>}'
2522
class="paypal checkout paypal-logo braintree-paypal-logo<?= /* @noEscape */ $block->getContainerId(); ?>-container">
2623
<div data-currency="<?= /* @noEscape */ $block->getCurrency(); ?>"
2724
data-locale="<?= /* @noEscape */ $block->getLocale(); ?>"

app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Formset.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main;
79

810
use Magento\Backend\Block\Widget\Form;
911

12+
/**
13+
* Form attribute set
14+
*
15+
* Class \Magento\Catalog\Block\Adminhtml\Product\Attribute\Set\Main\Formset
16+
*/
1017
class Formset extends \Magento\Backend\Block\Widget\Form\Generic
1118
{
1219
/**
@@ -43,7 +50,7 @@ protected function _prepareForm()
4350

4451
/** @var \Magento\Framework\Data\Form $form */
4552
$form = $this->_formFactory->create();
46-
$fieldset = $form->addFieldset('set_name', ['legend' => __('Edit Attribute Set Name')]);
53+
$fieldset = $form->addFieldset('set_name', ['legend' => $this->getAttributeSetLabel()]);
4754
$fieldset->addField(
4855
'attribute_set_name',
4956
'text',
@@ -84,4 +91,18 @@ protected function _prepareForm()
8491
$form->setOnsubmit('return false;');
8592
$this->setForm($form);
8693
}
94+
95+
/**
96+
* Get Attribute Set Label
97+
*
98+
* @return \Magento\Framework\Phrase
99+
*/
100+
private function getAttributeSetLabel()
101+
{
102+
if ($this->getRequest()->getParam('id', false)) {
103+
return __('Edit Attribute Set Name');
104+
}
105+
106+
return __('Attribute Set Information');
107+
}
87108
}

app/code/Magento/Catalog/i18n/en_US.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,3 +813,5 @@ Details,Details
813813
"Edit Category Design","Edit Category Design"
814814
"A total of %1 record(s) haven't been deleted. Please see server logs for more details.","A total of %1 record(s) haven't been deleted. Please see server logs for more details."
815815
"Are you sure you want to delete this category?","Are you sure you want to delete this category?"
816+
"Attribute Set Information","Attribute Set Information"
817+

app/code/Magento/Catalog/view/frontend/templates/product/breadcrumbs.phtml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
$viewModel = $block->getData('viewModel');
99
?>
1010
<div class="breadcrumbs"></div>
11+
<?php
12+
$widget = $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonDecode($viewModel->getJsonConfigurationHtmlEscaped());
13+
$widgetOptions = $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($widget['breadcrumbs']);
14+
?>
1115
<script type="text/x-magento-init">
12-
{
13-
".breadcrumbs": <?= $viewModel->getJsonConfigurationHtmlEscaped() ?>
16+
{
17+
".breadcrumbs": {
18+
"breadcrumbs": <?= /* @noEscape */ $widgetOptions ?>
1419
}
20+
}
1521
</script>

app/code/Magento/Catalog/view/frontend/templates/product/list/toolbar.phtml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
// phpcs:disable PSR2.Methods.FunctionCallSignature.SpaceBeforeOpenBracket
1616
?>
1717
<?php if ($block->getCollection()->getSize()) :?>
18-
<div class="toolbar toolbar-products" data-mage-init='<?= /* @noEscape */ $block->getWidgetOptionsJson() ?>'>
18+
<?php $widget = $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonDecode($block->getWidgetOptionsJson());
19+
$widgetOptions = $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($widget['productListToolbarForm']);
20+
?>
21+
<div class="toolbar toolbar-products" data-mage-init='{"productListToolbarForm":<?= /* @noEscape */ $widgetOptions ?>}'>
1922
<?php if ($block->isExpanded()) :?>
2023
<?php include ($block->getTemplateFile('Magento_Catalog::product/list/toolbar/viewmode.phtml')) ?>
2124
<?php endif; ?>

app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ define([
135135
// trigger global event, so other modules will be able add parameters to redirect url
136136
$('body').trigger('catalogCategoryAddToCartRedirect', eventData);
137137

138-
if (eventData.redirectParameters.length > 0) {
138+
if (eventData.redirectParameters.length > 0 &&
139+
window.location.href.split(/[?#]/)[0] === res.backUrl
140+
) {
139141
parameters = res.backUrl.split('#');
140142
parameters.push(eventData.redirectParameters.join('&'));
141143
res.backUrl = parameters.join('#');

app/code/Magento/Checkout/Test/Mftf/Test/NoErrorCartCheckoutForProductsDeletedFromMiniCartTest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
<see selector="{{StoreFrontRemoveItemModalSection.message}}" userInput="Are you sure you would like to remove this item from the shopping cart?" stepKey="seeDeleteConfirmationMessage"/>
4848
<click selector="{{StoreFrontRemoveItemModalSection.ok}}" stepKey="confirmDelete"/>
4949
<waitForPageLoad stepKey="waitForDeleteToFinish"/>
50-
<click selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="deleteProductFromCheckoutCart"/>
50+
<dontSeeElement selector="{{CheckoutCartProductSection.RemoveItem}}" stepKey="dontSeeDeleteProductFromCheckoutCart"/>
51+
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
5152
<waitForPageLoad stepKey="WaitForPageLoad3"/>
5253
<see userInput="You have no items in your shopping cart." stepKey="seeNoItemsInShoppingCart"/>
5354
</test>

app/code/Magento/Checkout/view/frontend/web/js/sidebar.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ define([
261261
$(document).trigger('ajax:removeFromCart', {
262262
productIds: [productData['product_id']]
263263
});
264+
265+
if (window.location.href.indexOf(this.shoppingCartUrl) === 0) {
266+
window.location.reload();
267+
}
264268
}
265269
},
266270

app/code/Magento/Config/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
#Config
1+
# Magento_Config module
2+
23
The Config module is designed to implement system configuration functionality.
3-
It provides mechanisms to add, edit, store and retrieve the configuration data
4-
for each scope (there can be a default scope as well as scopes for each website and store).
4+
It provides mechanisms to add, edit, store and retrieve the configuration data for each scope (there can be a default scope as well as scopes for each website and store).
55

6-
Modules can add items to be configured on the system configuration page by creating
7-
system.xml files in their etc/adminhtml directories. These system.xml files get merged
8-
to populate the forms in the config page.
6+
Modules can add items to be configured on the system configuration page by creating system.xml files in their etc/adminhtml directories. These system.xml files get merged to populate the forms in the config page.

0 commit comments

Comments
 (0)