Skip to content

Commit 44084c9

Browse files
committed
Merge branch '2.2-develop' of https://github.com/magento/magento2ce into MAGETWO-86125
2 parents 4af80a2 + 1b52d8c commit 44084c9

File tree

36 files changed

+165
-56
lines changed

36 files changed

+165
-56
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
?>
1111
<?php $_total = $block->getItems()->getSize() ?>
1212
<?php if ($_total): ?>
13-
<a href="#" class="action print" title="<?= /* @escapeNotVerified */ __('Print This Page') ?>">
13+
<a href="#" class="action print hidden-print" title="<?= /* @escapeNotVerified */ __('Print This Page') ?>">
1414
<span><?= /* @escapeNotVerified */ __('Print This Page') ?></span>
1515
</a>
1616
<div class="table-wrapper comparison">
@@ -29,7 +29,7 @@
2929
<?php if ($_i++ == 0): ?>
3030
<th scope="row" class="cell label remove"><span><?= /* @escapeNotVerified */ __('Remove Product') ?></span></th>
3131
<?php endif; ?>
32-
<td class="cell remove product">
32+
<td class="cell remove product hidden-print">
3333
<?php $compareHelper = $this->helper('Magento\Catalog\Helper\Product\Compare');?>
3434
<a href="#" data-post='<?= /* @escapeNotVerified */ $compareHelper->getPostDataRemove($_item) ?>'
3535
class="action delete" title="<?= /* @escapeNotVerified */ __('Remove Product') ?>">
@@ -59,7 +59,7 @@
5959
</strong>
6060
<?= $block->getReviewsSummaryHtml($_item, 'short') ?>
6161
<?= /* @escapeNotVerified */ $block->getProductPrice($_item, '-compare-list-top') ?>
62-
<div class="product-item-actions">
62+
<div class="product-item-actions hidden-print">
6363
<div class="actions-primary">
6464
<?php if ($_item->isSaleable()): ?>
6565
<form data-role="tocart-form" action="<?= /* @escapeNotVerified */ $this->helper('Magento\Catalog\Helper\Product\Compare')->getAddToCartUrl($_item) ?>" method="post">

app/code/Magento/Checkout/view/frontend/web/template/billing-address/form.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
<!-- ko template: getTemplate() --><!-- /ko -->
1010
<!--/ko-->
1111
<form data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">
12-
<fieldset id="billing-new-address-form" class="fieldset address">
12+
<fieldset
13+
data-bind="attr: { id:'billing-new-address-form-'+index, value:index}"
14+
class="billing-new-address-form fieldset address">
1315
<!-- ko foreach: getRegion('additional-fieldsets') -->
1416
<!-- ko template: getTemplate() --><!-- /ko -->
1517
<!--/ko-->

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,13 @@
4242
</form>
4343
</div>
4444
</div>
45+
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>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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.trimUsername', {
12+
options: {
13+
cache: {},
14+
formSelector: 'form',
15+
emailSelector: 'input[type="email"]'
16+
},
17+
18+
/**
19+
* Widget initialization
20+
* @private
21+
*/
22+
_create: function () {
23+
// We need to look outside the module for backward compatibility, since someone can already use the module.
24+
// @todo Narrow this selector in 2.3 so it doesn't accidentally finds the the email field from the
25+
// newsletter email field or any other "email" field.
26+
this.options.cache.email = $(this.options.formSelector).find(this.options.emailSelector);
27+
this._bind();
28+
},
29+
30+
/**
31+
* Event binding, will monitor change, keyup and paste events.
32+
* @private
33+
*/
34+
_bind: function () {
35+
if (this.options.cache.email.length) {
36+
this._on(this.options.cache.email, {
37+
'change': this._trimUsername,
38+
'keyup': this._trimUsername,
39+
'paste': this._trimUsername
40+
});
41+
}
42+
},
43+
44+
/**
45+
* Trim username
46+
* @private
47+
*/
48+
_trimUsername: function () {
49+
var username = this._getUsername().trim();
50+
51+
this.options.cache.email.val(username);
52+
},
53+
54+
/**
55+
* Get username value
56+
* @returns {*}
57+
* @private
58+
*/
59+
_getUsername: function () {
60+
return this.options.cache.email.val();
61+
}
62+
});
63+
64+
return $.mage.trimUsername;
65+
});

app/code/Magento/Eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public function getValue(\Magento\Framework\DataObject $object)
165165
$options = $opt->getAllOptions();
166166
if ($options) {
167167
foreach ($options as $option) {
168-
if ($option['value'] == $value) {
168+
if ($option['value'] === $value) {
169169
$valueOption = $option['label'];
170170
}
171171
}

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/GoogleAnalytics/view/frontend/web/js/google-analytics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ define([
5353
}
5454

5555
// Process orders data
56-
if (config.ordersTrackingData.length) {
56+
if (config.ordersTrackingData.hasOwnProperty('currency')) {
5757
ga('require', 'ec', 'ec.js');
5858

5959
//Set currency code

app/code/Magento/Integration/Setup/UpgradeSchema.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
7171
$setup->getConnection()->createTable($table);
7272
}
7373

74+
if (version_compare($context->getVersion(), '2.2.1', '<')) {
75+
$connection = $setup->getConnection();
76+
77+
$connection->addIndex(
78+
$setup->getTable('oauth_nonce'),
79+
$setup->getIdxName('oauth_nonce', ['timestamp']),
80+
['timestamp']
81+
);
82+
}
83+
7484
$setup->endSetup();
7585
}
7686
}

app/code/Magento/Integration/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Integration" setup_version="2.2.0">
9+
<module name="Magento_Integration" setup_version="2.2.1">
1010
<sequence>
1111
<module name="Magento_Store"/>
1212
<module name="Magento_User"/>

app/code/Magento/Multishipping/Test/Unit/Block/Checkout/SuccessTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testGetOrderIdsWithEmptyIdsArray()
7171
public function testGetOrderIds()
7272
{
7373
$ids = [100, 102, 103];
74-
$this->sessionMock->method('getOrderIds')->willReturn($ids);;
74+
$this->sessionMock->method('getOrderIds')->willReturn($ids);
7575

7676
$this->assertEquals($ids, $this->model->getOrderIds());
7777
}

0 commit comments

Comments
 (0)