Skip to content

Commit 9fd75bf

Browse files
committed
Merge remote-tracking branch 'origin/2.4-develop' into MC-37820
2 parents 022f38e + c46d9bf commit 9fd75bf

File tree

211 files changed

+6653
-46174
lines changed

Some content is hidden

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

211 files changed

+6653
-46174
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@
4343
- [ ] Pull request has a meaningful description of its purpose
4444
- [ ] All commits are accompanied by meaningful commit messages
4545
- [ ] All new or changed code is covered with unit/integration tests (if applicable)
46+
- [ ] README.md files for modified modules are updated and included in the pull request if any [README.md predefined sections](https://github.com/magento/devdocs/wiki/Magento-module-README.md) require an update
4647
- [ ] All automated tests passed successfully (all builds are green)

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
67

78
namespace Magento\Backend\Block\Store;
89

@@ -114,7 +115,8 @@ protected function _construct()
114115
{
115116
parent::_construct();
116117

117-
$this->setUseConfirm(true);
118+
$this->setUseConfirm($this->hasData('use_confirm') ? (bool)$this->getData('use_confirm') : true);
119+
118120
$this->setUseAjax(true);
119121

120122
$this->setShowManageStoresLink(0);

app/code/Magento/Backend/view/adminhtml/templates/media/uploader.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
78
/** @var $block \Magento\Backend\Block\Media\Uploader */
89
?>
910

app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml

Lines changed: 117 additions & 207 deletions
Large diffs are not rendered by default.

app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
/** @var $block \Magento\Backend\Block\GlobalSearch */
7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
8+
9+
use Magento\Backend\Block\GlobalSearch;
10+
use Magento\Framework\Json\Helper\Data;
11+
12+
/** @var $block GlobalSearch */
13+
/** @var Data $helper */
14+
$helper = $this->helper(Data::class);
15+
816
?>
917
<div class="search-global" data-mage-init='{"globalSearch": {}}'>
1018
<form action="#" id="form-search">
@@ -15,9 +23,7 @@
1523
class="search-global-input"
1624
id="search-global"
1725
name="query"
18-
<?php //phpcs:disable ?>
19-
data-mage-init='<?= /* @noEscape */ $this->helper(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($block->getWidgetInitOptions()) ?>'>
20-
<?php //phpcs:enable ?>
26+
data-mage-init='<?= /* @noEscape */ $helper->jsonEncode($block->getWidgetInitOptions()) ?>'>
2127
<button
2228
type="submit"
2329
class="search-global-action"
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery'
8+
], function ($) {
9+
'use strict';
10+
11+
/**
12+
* @param {Object} storeSwitchConfig
13+
*/
14+
return function (storeSwitchConfig) {
15+
var scopeSwitcherHandler;
16+
17+
(function () {
18+
var storesList = $('[data-role=stores-list]');
19+
20+
storesList.on('click', '[data-value]', function (event) {
21+
var val = $(event.target).data('value'),
22+
role = $(event.target).data('role'),
23+
switcher = $('[data-role=' + role + ']');
24+
25+
event.preventDefault();
26+
27+
if (!switcher.val() || val !== switcher.val()) {
28+
29+
/* Set the value & trigger event */
30+
switcher.val(val).trigger('change');
31+
}
32+
});
33+
})($);
34+
35+
/**
36+
* Switch store scope
37+
*
38+
* @param {Object} obj
39+
* @return void
40+
*/
41+
function switchScope(obj) {
42+
var switcher = $(obj),
43+
scopeId = switcher.val(),
44+
scopeParams = '',
45+
switcherParams = {};
46+
47+
if (scopeId) {
48+
scopeParams = switcher.data('param') + '/' + scopeId + '/';
49+
}
50+
51+
if (obj.switchParams) {
52+
scopeParams += obj.switchParams;
53+
}
54+
55+
/**
56+
* Reload function for switcher
57+
*/
58+
function reload() {
59+
var url;
60+
61+
if (!storeSwitchConfig.isUsingIframe) {
62+
63+
if (storeSwitchConfig.switchUrl && storeSwitchConfig.switchUrl.length > 0) {
64+
url = storeSwitchConfig.switchUrl + scopeParams;
65+
66+
/* eslint-disable no-undef */
67+
setLocation(url);
68+
}
69+
70+
} else {
71+
$('#preview_selected_store').val(scopeId);
72+
$('#preview_form').submit();
73+
74+
$('.store-switcher .dropdown-menu li a').each(function () {
75+
var $this = $(this);
76+
77+
if ($this.data('role') === 'store-view-id' && $this.data('value') === scopeId) {
78+
$('#store-change-button').html($this.text());
79+
}
80+
});
81+
82+
$('#store-change-button').click();
83+
}
84+
}
85+
86+
if (typeof scopeSwitcherHandler !== 'undefined') {
87+
switcherParams = {
88+
scopeId: scopeId,
89+
scopeParams: scopeParams,
90+
useConfirm: storeSwitchConfig.useConfirm
91+
};
92+
93+
scopeSwitcherHandler(switcherParams);
94+
} else if (storeSwitchConfig.useConfirm) {
95+
require([
96+
'Magento_Ui/js/modal/confirm',
97+
'mage/translate'
98+
], function (confirm, $t) {
99+
confirm({
100+
content: $t('Please confirm scope switching. All data that hasn\'t been saved will be lost.'),
101+
actions: {
102+
103+
/**
104+
* Confirm action
105+
*/
106+
confirm: function () {
107+
reload();
108+
},
109+
110+
/**
111+
* Cancel action
112+
*/
113+
cancel: function () {
114+
obj.value = storeSwitchConfig.storeId ? storeSwitchConfig.storeId : '';
115+
}
116+
}
117+
});
118+
});
119+
} else {
120+
reload();
121+
}
122+
}
123+
124+
window.scopeSwitcherHandler = scopeSwitcherHandler;
125+
window.switchScope = switchScope;
126+
};
127+
});

app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66
// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
78
/** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option */
89
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
910
?>

app/code/Magento/Bundle/view/adminhtml/templates/product/edit/bundle/option/selection.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66

7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
78
/** @var $block \Magento\Bundle\Block\Adminhtml\Catalog\Product\Edit\Tab\Bundle\Option\Selection */
89
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
910
?>

app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/summary.phtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
?>
76

8-
<?php
9-
$_product = $block->getProduct();
7+
// phpcs:disable PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound
8+
$_product = $block->getProduct();
109
?>
1110
<?php if ($_product->isSaleable() && $block->hasOptions()) : ?>
1211
<div id="bundleSummary"

app/code/Magento/Captcha/Test/Mftf/Data/CaptchaConfigData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@
4646
<data key="label">Change password</data>
4747
<data key="value">user_edit</data>
4848
</entity>
49+
<entity name="StorefrontCaptchaOnOnepageCheckoutConfigData">
50+
<data key="path">customer/captcha/forms</data>
51+
<data key="scope_id">0</data>
52+
<data key="label">Checkout/Placing Order</data>
53+
<data key="value">payment_processing_request</data>
54+
</entity>
4955
<entity name="StorefrontCaptchaOnCustomerForgotPasswordConfigData">
5056
<!-- Magento default value -->
5157
<data key="path">customer/captcha/forms</data>

0 commit comments

Comments
 (0)