Skip to content

Commit 0ad656d

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - #15764: [Forwardport] [Resolved : Menu widget submenu alignment] (by @hitesh-wagento) - #15763: [Forwardport] Function unnecessarily called multiple time (by @vgelani) - #15752: [Forwardport] Refactor JavsScript for customer logout (by @vijay-wagento) - #15757: [Forwardport] Move buttons definition to separate file (by @vijay-wagento) - #15750: [Forwardport] Added language translation in template files (by @vijay-wagento) - #15747: [Forwardport] Refactor JavsScript for UrlRewrite module edit page (by @vijay-wagento) - #15696: [Forwardport] fixed Submitting search form (mini) with enter key fires event handle� (by @vgelani) - #15705: [Forwardport] Fix #13415 : Duplicated elements id (by @julienanquetil) - #15731: [Forwardport] Refactor javascript code of button split widget (by @vijay-wagento) - #15738: [Forwardport] fix: support multiple minisearch widget instances (by @vijay-wagento) - #15717: Fixed return type of wishlist's getImageData in DocBlock (by @rogyar) - #15709: [Forwardport] [Resolved : Menu widget submenu alignment #7897] (by @dmytro-ch) - #15707: [Forwardport] Typo correction (by @dmytro-ch) - #15706: [Forwardport] Use stored value of method instead of calling same method again. (by @dmytro-ch) - #15703: [Forwardport] Remove extra space and format the code in translation file (by @dmytro-ch) - #15701: [Forwardport] Fix HTML syntax in report.phtml error template (by @dmytro-ch) - #15665: [Forwardport] Wrong invoice prefix in multistore setup due to default store (by @vgelani) Fixed GitHub Issues: - #7897: Menu widget submenu alignment (reported by @slackerzz) has been fixed in #15764 by @hitesh-wagento in 2.3-develop branch Related commits: 1. ecc5f7b - #15355: Function is unnecessarily called multiple time (reported by @saurabh-aureate) has been fixed in #15763 by @vgelani in 2.3-develop branch Related commits: 1. bcdd8f2 - #15356: Refactore javascript for module URL rewrite (reported by @vgelani) has been fixed in #15747 by @vijay-wagento in 2.3-develop branch Related commits: 1. 6711694 - #13793: Submitting search form (mini) with enter key fires event handlers bound by jquery twice (reported by @koenner01) has been fixed in #15696 by @vgelani in 2.3-develop branch Related commits: 1. 04583ac - #13415: Duplicated elements id in checkout page (reported by @angelo983) has been fixed in #15705 by @julienanquetil in 2.3-develop branch Related commits: 1. 82d0491 2. fbb81c9 3. 6301ed4 - #15354: Refactor javascript code of button split widget call js component (reported by @amittiwari024) has been fixed in #15731 by @vijay-wagento in 2.3-develop branch Related commits: 1. eaa585d - #7897: Menu widget submenu alignment (reported by @slackerzz) has been fixed in #15709 by @dmytro-ch in 2.3-develop branch Related commits: 1. 14bf8af - #14063: Wrong invoice prefix in multistore setup due to default store id (reported by @shinesoftware) has been fixed in #15665 by @vgelani in 2.3-develop branch Related commits: 1. d5c3952
2 parents 66abad2 + 3409fba commit 0ad656d

File tree

22 files changed

+110
-62
lines changed

22 files changed

+110
-62
lines changed

app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
<?php endif; ?>
4242
</div>
4343

44-
<script>
45-
require(['jquery'], function($){
46-
$('.actions-split')
47-
.on('click.splitDefault', '.action-default', function() {
48-
$(this).siblings('.dropdown-menu').find('.item-default').trigger('click');
49-
});
50-
});
44+
<script type="text/x-magento-init">
45+
{
46+
".actions-split": {
47+
"Magento_Ui/js/grid/controls/button/split": {}
48+
}
49+
}
5150
</script>
51+

app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ $ccType = $block->getInfoData('cc_type');
8484
name="payment[is_active_payment_token_enabler]"
8585
class="admin__control-checkbox"/>
8686
<label class="label" for="<?= /* @noEscape */ $code ?>_vault">
87-
<span><?= $block->escapeHtml('Save for later use.') ?></span>
87+
<span><?= $block->escapeHtml(__('Save for later use.')) ?></span>
8888
</label>
8989
</div>
9090
<?php endif; ?>

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ Forms,Forms
2020
"Number of Symbols","Number of Symbols"
2121
"Please specify 8 symbols at the most. Range allowed (e.g. 3-5)","Please specify 8 symbols at the most. Range allowed (e.g. 3-5)"
2222
"Symbols Used in CAPTCHA","Symbols Used in CAPTCHA"
23-
"
24-
Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.
25-
","
26-
Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.
27-
"
23+
"Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.","Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.<br />Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer."
2824
"Case Sensitive","Case Sensitive"
2925
"Enable CAPTCHA on Storefront","Enable CAPTCHA on Storefront"
3026
"CAPTCHA for ""Create user"" and ""Forgot password"" forms is always enabled if chosen.","CAPTCHA for ""Create user"" and ""Forgot password"" forms is always enabled if chosen."

app/code/Magento/Catalog/Model/Product/Type/AbstractType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public function getChildrenIds($parentId, $required = true)
252252
}
253253

254254
/**
255-
* Retrieve parent ids array by requered child
255+
* Retrieve parent ids array by required child
256256
*
257257
* @param int|array $childId
258258
* @return array

app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
*/
1414
?>
1515

16-
<?php $block->getCurrencySymbolsData();?>
17-
1816
<form id="currency-symbols-form" action="<?= /* @escapeNotVerified */ $block->getFormActionUrl() ?>" method="post">
1917
<input name="form_key" type="hidden" value="<?= /* @escapeNotVerified */ $block->getFormKey() ?>" />
2018
<fieldset class="admin__fieldset">

app/code/Magento/Customer/view/frontend/templates/logout.phtml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
/** @var \Magento\Framework\View\Element\Template $block */
88
?>
99
<p><?= $block->escapeHtml(__('You have signed out and will go to our homepage in 5 seconds.')) ?></p>
10-
<script>
11-
require([
12-
"jquery",
13-
"mage/mage"
14-
], function($){
15-
16-
$($.mage.redirect("<?= $block->escapeJs($block->escapeUrl($block->getUrl())) ?>", "assign", 5000));
17-
18-
});
10+
<script type="text/x-magento-init">
11+
{
12+
"*": {
13+
"Magento_Customer/js/logout-redirect": {
14+
"url": "<?= $block->escapeJs($block->escapeUrl($block->getUrl())) ?>"
15+
}
16+
}
17+
}
1918
</script>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery',
8+
'mage/mage'
9+
], function ($) {
10+
'use strict';
11+
12+
return function (data) {
13+
$($.mage.redirect(data.url, 'assign', 5000));
14+
};
15+
});

app/code/Magento/GiftMessage/view/frontend/web/template/gift-message-form.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,24 @@
1212
<div class="gift-options-content">
1313
<fieldset class="fieldset">
1414
<div class="field field-to">
15-
<label for="gift-message-whole-to" class="label">
15+
<label data-bind="attr: {for: 'gift-message-whole-to-' + index }" class="label">
1616
<span data-bind="i18n: 'To:'"></span>
1717
</label>
1818
<div class="control">
1919
<input type="text"
20-
id="gift-message-whole-to"
2120
class="input-text"
22-
data-bind="value: getObservable('recipient')">
21+
data-bind="value: getObservable('recipient'), attr: { id: 'gift-message-whole-to-' + index }">
2322
</div>
2423
</div>
2524

2625
<div class="field field-from">
27-
<label for="gift-message-whole-from" class="label">
26+
<label data-bind="attr: {for: 'gift-message-whole-from-' + index }" class="label">
2827
<span data-bind="i18n: 'From:'"></span>
2928
</label>
3029
<div class="control">
3130
<input type="text"
32-
id="gift-message-whole-from"
3331
class="input-text"
34-
data-bind="value: getObservable('sender')">
32+
data-bind="value: getObservable('sender'), attr: { id: 'gift-message-whole-from-' + index }">
3533
</div>
3634
</div>
3735
<div class="field text">
@@ -46,7 +44,6 @@
4644
</div>
4745
</div>
4846
</fieldset>
49-
5047
</div>
5148
</div>
5249
<!-- /ko -->

app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$partners = $block->getPartners();
1212
?>
1313
<?php if ($partners) : ?>
14-
<?php foreach ($block->getPartners() as $partner) : ?>
14+
<?php foreach ($partners as $partner) : ?>
1515
<div class="partner">
1616
<img
1717
class="partner-image"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,5 @@ Options,Options
8888
"Review Order","Review Order"
8989
"Select Shipping Method","Select Shipping Method"
9090
"We received your order!","We received your order!"
91+
"Ship to:","Ship to:"
92+
"Error:","Error:"

app/code/Magento/Multishipping/view/frontend/templates/checkout/results.phtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $orderIds = $block->getOrderIds();
3232
<?php $shippingAddress = $block->getOrderShippingAddress($orderId); ?>
3333
<div class="shipping-item">
3434
<?php if ($shippingAddress) : ?>
35-
<span class="shipping-label"><?= $block->escapeHtml('Ship to:'); ?></span>
35+
<span class="shipping-label"><?= $block->escapeHtml(__('Ship to:')); ?></span>
3636
<span class="shipping-address">
3737
<?= $block->escapeHtml($block->formatOrderShippingAddress($shippingAddress)); ?>
3838
</span>
@@ -65,7 +65,7 @@ $orderIds = $block->getOrderIds();
6565
<dl class="shipping-item">
6666
<dt class="shipping-block">
6767
<?php if ($block->isShippingAddress($address)) : ?>
68-
<span class="shipping-label"><?= $block->escapeHtml('Ship to:'); ?></span>
68+
<span class="shipping-label"><?= $block->escapeHtml(__('Ship to:')); ?></span>
6969
<span class="shipping-address">
7070
<?= $block->escapeHtml($block->formatQuoteShippingAddress($address)); ?>
7171
</span>
@@ -76,7 +76,7 @@ $orderIds = $block->getOrderIds();
7676
<?php endif; ?>
7777
</dt>
7878
<dd class="error-block">
79-
<span class="error-label"><?= $block->escapeHtml('Error:'); ?></span>
79+
<span class="error-label"><?= $block->escapeHtml(__('Error:')); ?></span>
8080
<span class="error-description">
8181
<?= /* @noEscape */ $block->getAddressError($address); ?>
8282
</span>

app/code/Magento/Multishipping/view/frontend/templates/checkout/success.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<?php $shippingAddress = $block->getCheckoutData()->getOrderShippingAddress($orderId); ?>
2323
<div class="shipping-item">
2424
<?php if ($shippingAddress) : ?>
25-
<span class="shipping-label"><?= $block->escapeHtml('Ship to:'); ?></span>
25+
<span class="shipping-label"><?= $block->escapeHtml(__('Ship to:')); ?></span>
2626
<span class="shipping-address">
2727
<?= $block->escapeHtml(
2828
$block->getCheckoutData()->formatOrderShippingAddress($shippingAddress)

app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
135135
name="payment[is_active_payment_token_enabler]"
136136
class="admin__control-checkbox"/>
137137
<label class="admin__field-label" for="<?= /* @noEscape */ $code ?>_vault">
138-
<span><?= $block->escapeHtml('Save for later use.') ?></span>
138+
<span><?= $block->escapeHtml(__('Save for later use.')) ?></span>
139139
</label>
140140
</div>
141141
<?php endif; ?>

app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,15 @@ protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
123123
{
124124
/** @var \Magento\Sales\Model\AbstractModel $object */
125125
if ($object instanceof EntityInterface && $object->getIncrementId() == null) {
126+
$store = $object->getStore();
127+
$storeId = $store->getId();
128+
if ($storeId === null) {
129+
$storeId = $store->getGroup()->getDefaultStoreId();
130+
}
126131
$object->setIncrementId(
127132
$this->sequenceManager->getSequence(
128133
$object->getEntityType(),
129-
$object->getStore()->getGroup()->getDefaultStoreId()
134+
$storeId
130135
)->getNextValue()
131136
);
132137
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ define([
5555
this.autoComplete = $(this.options.destinationSelector);
5656
this.searchForm = $(this.options.formSelector);
5757
this.submitBtn = this.searchForm.find(this.options.submitBtn)[0];
58-
this.searchLabel = $(this.options.searchLabel);
58+
this.searchLabel = this.searchForm.find(this.options.searchLabel);
5959
this.isExpandable = this.options.isExpandable;
6060

6161
_.bindAll(this, '_onKeyDown', '_onPropertyChange', '_onSubmit');
@@ -226,6 +226,7 @@ define([
226226

227227
case $.ui.keyCode.ENTER:
228228
this.searchForm.trigger('submit');
229+
e.preventDefault();
229230
break;
230231

231232
case $.ui.keyCode.DOWN:

app/code/Magento/Ui/view/base/web/js/form/adapter.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,12 @@
88
*/
99
define([
1010
'jquery',
11-
'underscore'
12-
], function ($, _) {
11+
'underscore',
12+
'Magento_Ui/js/form/adapter/buttons'
13+
], function ($, _, buttons) {
1314
'use strict';
1415

15-
var buttons = {
16-
'reset': '#reset',
17-
'save': '#save',
18-
'saveAndContinue': '#save_and_continue'
19-
},
20-
selectorPrefix = '',
16+
var selectorPrefix = '',
2117
eventPrefix;
2218

2319
/**
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
/**
7+
* @api
8+
*/
9+
define(function () {
10+
'use strict';
11+
12+
return {
13+
'reset': '#reset',
14+
'save': '#save',
15+
'saveAndContinue': '#save_and_continue'
16+
};
17+
});

app/code/Magento/UrlRewrite/view/adminhtml/templates/edit.phtml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
?>
1111
<?= $block->getChildHtml() ?>
1212
<?php if ($block->getChildBlock('form')): ?>
13-
<script>
14-
require([
15-
'jquery',
16-
'mage/backend/form',
17-
'mage/backend/validation'
18-
], function($){
19-
$('#edit_form').form()
20-
.validation({validationUrl: '<?= $block->escapeUrl($block->getValidationUrl()) ?>'});
21-
});
13+
<script type="text/x-magento-init">
14+
{
15+
"#edit_form": {
16+
"Magento_UrlRewrite/js/url-rewrite-validation" : {
17+
"url": "<?= $block->escapeUrl($block->getValidationUrl()) ?>"
18+
}
19+
}
20+
}
2221
</script>
2322
<?php endif; ?>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
define([
7+
'jquery',
8+
'mage/backend/form',
9+
'mage/backend/validation'
10+
], function ($) {
11+
'use strict';
12+
13+
return function (data, element) {
14+
15+
$(element).form().validation({
16+
validationUrl: data.url
17+
});
18+
};
19+
});

app/code/Magento/Wishlist/CustomerData/Wishlist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ protected function getItemData(\Magento\Wishlist\Model\Item $wishlistItem)
144144
* Retrieve product image data
145145
*
146146
* @param \Magento\Catalog\Model\Product $product
147-
* @return \Magento\Catalog\Block\Product\Image
147+
* @return array
148148
* @SuppressWarnings(PHPMD.NPathComplexity)
149149
*/
150150
protected function getImageData($product)

lib/web/css/source/lib/_navigation.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@
305305
.lib-css(border-top, none);
306306
}
307307

308+
li.level1 {
309+
position: relative;
310+
}
311+
308312
.level0 {
309313
.lib-css(margin, @_nav-level0-item-margin);
310314
display: inline-block;

pub/errors/default/report.phtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,25 @@
3636
</div>
3737
<div class="field lastname required">
3838
<label for="lastname" class="label">Last Name</label>
39-
<div class=control">
39+
<div class="control">
4040
<input type="text" name="lastname" id="lastname" value="<?= $this->postData['lastName'] ?>" title="Last Name" class="required-entry input-text" />
4141
</div>
4242
</div>
4343
<div class="field email required">
4444
<label for="email_address" class="label">Email Address</label>
45-
<div class=control">
45+
<div class="control">
4646
<input type="text" name="email" id="email_address" value="<?= $this->postData['email'] ?>" title="Email Address" class="validate-email required-entry input-text" />
4747
</div>
4848
</div>
4949
<div class="field telephone">
5050
<label for="telephone" class="label">Telephone</label>
51-
<div class=control">
51+
<div class="control">
5252
<input type="text" name="telephone" id="telephone" value="<?= $this->postData['telephone'] ?>" title="Telephone" class="input-text" />
5353
</div>
5454
</div>
5555
<div class="field comment">
5656
<label for="comment" class="label">Comment</label>
57-
<div class=control">
57+
<div class="control">
5858
<textarea name="comment" cols="5" rows="3" class="textarea"><?= $this->postData['comment'] ?></textarea>
5959
</div>
6060
</div>

0 commit comments

Comments
 (0)