Skip to content

Commit 8405bd2

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #16230: Correct spelling mistakes in Model and library files. (by @namratachangani) - #16216: 15863: [Forwardport] Refactored javascript code of admin notification modal popup (by @IvanPletnyov) - #16220: Incorrect value NULL was passed to DataObject constructor. It caused � (by @Jakhotiya) - #16213: Fix for #8222 (by @0m3r) - #16211: Setting deploy mode to production with --skip-compilation flag should not clear generated code (by @platformvaimo) - #16206: Declare module namespace before template path name(Magento_Sales::order/info.phtml). (by @ronak2ram) - #16192: Trim email address in customer account create and login form (by @dankhrapiyush) - #16194: #16184: Fix type error in payment void method (by @xpoback) Fixed GitHub Issues: - #8222: Estimate Shipping and Tax Form not works due to js error in collapsible.js [proposed fix] (reported by @Dart18) has been fixed in #16213 by @0m3r in 2.2-develop branch Related commits: 1. 4952d50 - #6058: IE11 user login email validation fails if field has leading or trailing space (reported by @dnadle) has been fixed in #16192 by @dankhrapiyush in 2.2-develop branch Related commits: 1. 3cf1d74 2. bd7d3b4 3. 8a17d2c - #16184: Argument 1 passed to Magento\Sales\Model\Order\Payment must be an instance of Magento\Framework\DataObject, none given (reported by @Jakhotiya) has been fixed in #16194 by @xpoback in 2.2-develop branch Related commits: 1. a7839e2
2 parents f38cc97 + 5581a23 commit 8405bd2

File tree

16 files changed

+88
-96
lines changed

16 files changed

+88
-96
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
{
2424
"[data-role=system_messages_list]": {
2525
"Magento_AdminNotification/js/system/messages/popup": {
26-
class: 'modal-system-messages ui-popup-message'
26+
"class":"modal-system-messages ui-popup-message"
2727
}
2828
}
2929
}
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
/**
22
* Copyright © Magento, Inc. All rights reserved.
33
* See COPYING.txt for license details.
4-
*/
4+
*/
55

66
define([
77
'jquery',
88
'Magento_Ui/js/modal/modal'
9-
], function ($) {
9+
], function ($, modal) {
1010
'use strict';
1111

1212
return function (data, element) {
13-
if (this.modal) {
14-
this.modal.html($(element).html());
13+
14+
if (modal.modal) {
15+
modal.modal.html($(element).html());
1516
} else {
16-
this.modal = $(element).modal({
17+
modal.modal = $(element).modal({
1718
modalClass: data.class,
1819
type: 'popup',
1920
buttons: []
2021
});
2122
}
22-
this.modal.modal('openModal');
23+
24+
modal.modal.modal('openModal');
2325
};
2426
});

app/code/Magento/Authorizenet/Model/Directpost.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,10 +814,14 @@ protected function declineOrder(\Magento\Sales\Model\Order $order, $message = ''
814814
{
815815
try {
816816
$response = $this->getResponse();
817-
if ($voidPayment && $response->getXTransId() && strtoupper($response->getXType())
818-
== self::REQUEST_TYPE_AUTH_ONLY
817+
if ($voidPayment
818+
&& $response->getXTransId()
819+
&& strtoupper($response->getXType()) == self::REQUEST_TYPE_AUTH_ONLY
819820
) {
820-
$order->getPayment()->setTransactionId(null)->setParentTransactionId($response->getXTransId())->void();
821+
$order->getPayment()
822+
->setTransactionId(null)
823+
->setParentTransactionId($response->getXTransId())
824+
->void($response);
821825
}
822826
$order->registerCancellation($message)->save();
823827
} catch (\Exception $e) {

app/code/Magento/Catalog/Model/Product/Gallery/Processor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ public function setMediaAttribute(\Magento\Catalog\Model\Product $product, $medi
340340
$mediaAttributeCodes = $this->mediaConfig->getMediaAttributeCodes();
341341

342342
if (is_array($mediaAttribute)) {
343-
foreach ($mediaAttribute as $atttribute) {
344-
if (in_array($atttribute, $mediaAttributeCodes)) {
345-
$product->setData($atttribute, $value);
343+
foreach ($mediaAttribute as $attribute) {
344+
if (in_array($attribute, $mediaAttributeCodes)) {
345+
$product->setData($attribute, $value);
346346
}
347347
}
348348
} elseif (in_array($mediaAttribute, $mediaAttributeCodes)) {

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>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
<div class="field required">
132132
<label for="email_address" class="label"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
133133
<div class="control">
134-
<input type="email" name="email" autocomplete="email" id="email_address" value="<?= $block->escapeHtmlAttr($block->getFormData()->getEmail()) ?>" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" class="input-text" data-validate="{required:true, 'validate-email':true}">
134+
<input type="email" name="email" autocomplete="email" id="email_address" value="<?= $block->escapeHtmlAttr($block->getFormData()->getEmail()) ?>" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" data-mage-init='{"mage/trim-input":{}}' class="input-text" data-validate="{required:true, 'validate-email':true}">
135135
</div>
136136
</div>
137137
<div class="field password required">

app/code/Magento/Customer/view/frontend/web/js/model/authentication-popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ define([
3434

3535
/** Show login popup window */
3636
showModal: function () {
37-
$(this.modalWindow).modal('openModal');
37+
$(this.modalWindow).modal('openModal').trigger('contentUpdated');
3838
}
3939
};
4040
});

app/code/Magento/Customer/view/frontend/web/js/trim-username.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

app/code/Magento/Customer/view/frontend/web/template/authentication-popup.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
id="customer-email"
6161
type="email"
6262
class="input-text"
63+
data-mage-init='{"mage/trim-input":{}}'
6364
data-bind="attr: {autocomplete: autocomplete}"
6465
data-validate="{required:true, 'validate-email':true}">
6566
</div>

app/code/Magento/Sales/Block/Order/Info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Info extends \Magento\Framework\View\Element\Template
2323
/**
2424
* @var string
2525
*/
26-
protected $_template = 'order/info.phtml';
26+
protected $_template = 'Magento_Sales::order/info.phtml';
2727

2828
/**
2929
* Core registry

app/code/Magento/Wishlist/Model/Item.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ public function getProductUrl()
473473
public function getBuyRequest()
474474
{
475475
$option = $this->getOptionByCode('info_buyRequest');
476-
$initialData = $option ? $this->serializer->unserialize($option->getValue()) : null;
476+
$initialData = $option ? $this->serializer->unserialize($option->getValue()) : [];
477477

478478
if ($initialData instanceof \Magento\Framework\DataObject) {
479479
$initialData = $initialData->getData();

lib/internal/Magento/Framework/Code/GeneratedFiles.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private function disableAllCacheTypes()
180180
}
181181

182182
/**
183-
* Enables apppropriate cache types in app/etc/env.php based on the passed in $cacheTypes array
183+
* Enables appropriate cache types in app/etc/env.php based on the passed in $cacheTypes array
184184
* TODO: to be removed in scope of MAGETWO-53476
185185
*
186186
* @param string[] $cacheTypes

lib/web/mage/collapsible.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ define([
110110
_processState: function () {
111111
var anchor = window.location.hash,
112112
isValid = $.mage.isValidSelector(anchor),
113-
urlPath = window.location.pathname.replace('.', ''),
113+
urlPath = window.location.pathname.replace(/\./g, ''),
114114
state;
115115

116116
this.stateKey = encodeURIComponent(urlPath + this.element.attr('id'));

lib/web/mage/trim-input.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
$.widget('mage.trimInput', {
12+
options: {
13+
cache: {}
14+
},
15+
16+
/**
17+
* Widget initialization
18+
* @private
19+
*/
20+
_create: function () {
21+
this.options.cache.input = $(this.element);
22+
this._bind();
23+
},
24+
25+
/**
26+
* Event binding, will monitor change, keyup and paste events.
27+
* @private
28+
*/
29+
_bind: function () {
30+
if (this.options.cache.input.length) {
31+
this._on(this.options.cache.input, {
32+
'change': this._trimInput,
33+
'keyup': this._trimInput,
34+
'paste': this._trimInput
35+
});
36+
}
37+
},
38+
39+
/**
40+
* Trim value
41+
* @private
42+
*/
43+
_trimInput: function () {
44+
var input = this._getInputValue().trim();
45+
46+
this.options.cache.input.val(input);
47+
},
48+
49+
/**
50+
* Get input value
51+
* @returns {*}
52+
* @private
53+
*/
54+
_getInputValue: function () {
55+
return this.options.cache.input.val();
56+
}
57+
});
58+
59+
return $.mage.trimInput;
60+
});

lib/web/modernizr/modernizr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ window.Modernizr = (function( window, document, undefined ) {
169169
// isEventSupported determines if a given element supports the given event
170170
// kangax.github.com/iseventsupported/
171171
//
172-
// The following results are known incorrects:
172+
// The following results are known incorrect:
173173
// Modernizr.hasEvent("webkitTransitionEnd", elem) // false negative
174174
// Modernizr.hasEvent("textInput") // in Webkit. github.com/Modernizr/Modernizr/issues/333
175175
// ...

setup/src/Magento/Setup/Console/CompilerPreparation.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ private function getCompilerInvalidationCommands()
105105
'module:disable',
106106
'module:enable',
107107
'module:uninstall',
108-
'deploy:mode:set'
109108
];
110109
}
111110

0 commit comments

Comments
 (0)