Skip to content

Commit 951694c

Browse files
author
Onischenko, Yaroslav(yonischenko)
committed
Merge pull request #549 from magento-webdev/PR-webdev
[WebDev] Bugfixes
2 parents 1aa5f73 + 5ee72e1 commit 951694c

File tree

86 files changed

+652
-244
lines changed

Some content is hidden

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

86 files changed

+652
-244
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/Action.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ protected function _toOptionHtml($action, \Magento\Framework\DataObject $row)
8282
$actionCaption = '';
8383
$this->_transformActionData($action, $actionCaption, $row);
8484

85-
$htmlAttibutes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
86-
$actionAttributes->setData($htmlAttibutes);
85+
$htmlAttributes = ['value' => $this->escapeHtml($this->_jsonEncoder->encode($action))];
86+
$actionAttributes->setData($htmlAttributes);
8787
return '<option ' . $actionAttributes->serialize() . '>' . $actionCaption . '</option>';
8888
}
8989

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<?php else: ?>
2626
<?php echo $block->getHintHtml() ?>
2727
<?php endif; ?>
28-
<div class="tree-store-scope">
28+
<div class="admin__fieldset tree-store-scope">
2929
<?php if ($_element->getComment()): ?>
3030
<p class="comment"><?php echo $block->escapeHtml($_element->getComment()) ?></p>
3131
<?php endif; ?>

app/code/Magento/Braintree/view/frontend/web/template/payment/form.html

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,26 +105,24 @@
105105
</div>
106106
<!-- /ko -->
107107
<!-- ko if: (isVaultEnabled())-->
108-
<div class="field">
108+
<div class="field choice">
109109
<input type="checkbox"
110110
name="vault[is_enabled]"
111-
class="checkbox-inline"
111+
class="checkbox"
112112
data-bind="attr: {'id': getCode() + '_vault_enabler'}, checked: vaultEnabler.isActivePaymentTokenEnabler"/>
113113
<label class="label" data-bind="attr: {'for': getCode() + '_vault_enabler'}">
114114
<span><!-- ko i18n: 'Save for later use.'--><!-- /ko --></span>
115115
</label>
116-
<div class="control _with-tooltip">
117-
<div class="field-tooltip toggle">
116+
<div class="field-tooltip toggle">
118117
<span class="field-tooltip-action action-vault"
119118
tabindex="0"
120119
data-toggle="dropdown"
121120
data-bind="attr: {title: $t('What is this?')}, mageInit: {'dropdown':{'activeClass': '_active'}}">
122121
<span translate="'What is this?'"></span>
123122
</span>
124-
<div class="field-tooltip-content"
125-
data-target="dropdown"
126-
translate="'We store you payment information securely on Braintree servers via SSL.'"></div>
127-
</div>
123+
<div class="field-tooltip-content"
124+
data-target="dropdown"
125+
translate="'We store you payment information securely on Braintree servers via SSL.'"></div>
128126
</div>
129127
</div>
130128
<!-- /ko -->

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ protected function getBundleSelections()
578578
'parentSelections' => 'bundle_selections',
579579
'changer' => 'option_info.type',
580580
'dataType' => Form\Element\DataType\Boolean::NAME,
581-
'label' => __('Default'),
581+
'label' => __('Is Default'),
582582
'dataScope' => 'is_default',
583583
'prefer' => 'radio',
584584
'value' => '0',

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AdvancedPricing.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@ protected function getTierPriceStructure($tierPricePath)
493493
'label' => __('Price'),
494494
'enableLabel' => true,
495495
'dataScope' => 'price',
496+
'addbefore' => $this->locator->getStore()
497+
->getBaseCurrency()
498+
->getCurrencySymbol(),
496499
],
497500
],
498501
],

app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/CustomOptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ protected function createCustomOptionsPanel()
238238
],
239239
],
240240
'children' => [
241-
static::FIELD_ENABLE => $this->getEnableFieldConfig(10),
242-
static::CONTAINER_HEADER_NAME => $this->getHeaderContainerConfig(20),
241+
static::CONTAINER_HEADER_NAME => $this->getHeaderContainerConfig(10),
242+
static::FIELD_ENABLE => $this->getEnableFieldConfig(20),
243243
static::GRID_OPTIONS_NAME => $this->getOptionsGridConfig(30)
244244
]
245245
]

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88

99
?>
1010
<div class="attribute-set">
11+
12+
<div class="admin__data-grid-loading-mask"
13+
data-role="spinner">
14+
<div class="spinner">
15+
<span></span><span></span><span></span><span></span>
16+
<span></span><span></span><span></span><span></span>
17+
</div>
18+
</div>
1119
<div class="edit-attribute-set attribute-set-col">
1220
<?php echo $block->getSetFormHtml() ?>
1321
<script>
@@ -423,6 +431,7 @@
423431
jQuery(function() {
424432
initVars();
425433
TreePanels.init();
434+
jQuery("[data-role='spinner']").hide();
426435
});
427436
//]]>
428437

app/code/Magento/Catalog/view/adminhtml/ui_component/category_form.xml

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -145,33 +145,24 @@
145145
<item name="sortOrder" xsi:type="number">10</item>
146146
</item>
147147
</argument>
148-
<container name="image_group">
148+
<field name="image">
149149
<argument name="data" xsi:type="array">
150-
<item name="type" xsi:type="string">group</item>
151150
<item name="config" xsi:type="array">
152-
<item name="component" xsi:type="string">Magento_Ui/js/form/components/group</item>
151+
<item name="dataType" xsi:type="string">string</item>
152+
<item name="source" xsi:type="string">category</item>
153153
<item name="label" xsi:type="string" translate="true">Category Image</item>
154+
<item name="visible" xsi:type="boolean">true</item>
155+
<item name="formElement" xsi:type="string">fileUploader</item>
156+
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
157+
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
154158
<item name="required" xsi:type="boolean">false</item>
155159
<item name="sortOrder" xsi:type="number">40</item>
160+
<item name="uploaderConfig" xsi:type="array">
161+
<item name="url" xsi:type="url" path="catalog/category_image/upload"/>
162+
</item>
156163
</item>
157164
</argument>
158-
<field name="image">
159-
<argument name="data" xsi:type="array">
160-
<item name="config" xsi:type="array">
161-
<item name="dataType" xsi:type="string">string</item>
162-
<item name="source" xsi:type="string">category</item>
163-
<item name="label" xsi:type="string"/>
164-
<item name="visible" xsi:type="boolean">true</item>
165-
<item name="formElement" xsi:type="string">fileUploader</item>
166-
<item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
167-
<item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
168-
<item name="uploaderConfig" xsi:type="array">
169-
<item name="url" xsi:type="url" path="catalog/category_image/upload"/>
170-
</item>
171-
</item>
172-
</argument>
173-
</field>
174-
</container>
165+
</field>
175166
<field name="description">
176167
<argument name="data" xsi:type="array">
177168
<item name="config" xsi:type="array">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</th>
102102
<?php endif; ?>
103103
<td class="cell product attribute">
104-
<div class="attibute value">
104+
<div class="attribute value">
105105
<?php switch ($_attribute->getAttributeCode()) {
106106
case "price": ?>
107107
<?php

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if ($_attributeType && $_attributeType == 'text') {
3333
?>
3434

3535
<?php if ($_attributeValue): ?>
36-
<div class="product attibute <?php /* @escapeNotVerified */ echo $_className?>">
36+
<div class="product attribute <?php /* @escapeNotVerified */ echo $_className?>">
3737
<?php if ($_attributeLabel != 'none'): ?><strong class="type"><?php /* @escapeNotVerified */ echo $_attributeLabel?></strong><?php endif; ?>
3838
<div class="value" <?php /* @escapeNotVerified */ echo $_attributeAddAttribute;?>><?php /* @escapeNotVerified */ echo $_attributeValue; ?></div>
3939
</div>

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/Product/ValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function attributeValidationProvider()
108108
['apply_to' => ['expected_product_type']],
109109
['product_type' => 'not_expected_product_type'],
110110
true, //validation skipped in such case, so it means attribute is valid
111-
'any_attibute_code',
111+
'any_attribute_code',
112112
],
113113
[
114114
'any_behavior',

app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/ConfigurableAttributeSetHandler.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public function modifyMeta(array $meta)
7373
'prefer' => 'radio',
7474
'description' => __('Add configurable attributes to the current Attribute Set'),
7575
'dataScope' => 'configurableAffectedAttributeSet',
76-
'label' => ' ',
7776
'valueMap' => [
7877
'true' => 'current',
7978
'false' => '0',
@@ -96,7 +95,6 @@ public function modifyMeta(array $meta)
9695
'Add configurable attributes to the new Attribute Set based on current'
9796
),
9897
'dataScope' => 'configurableAffectedAttributeSet',
99-
'label' => ' ',
10098
'valueMap' => [
10199
'true' => 'new',
102100
'false' => '0',
@@ -120,7 +118,6 @@ public function modifyMeta(array $meta)
120118
'Add configurable attributes to the existing Attribute Set'
121119
),
122120
'dataScope' => 'configurableAffectedAttributeSet',
123-
'label' => ' ',
124121
'valueMap' => [
125122
'true' => 'existing',
126123
'false' => '0',

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@
6060
data-validate="{required:true, 'validate-customer-password':true}"
6161
autocomplete="off" />
6262
<div id="password-strength-meter-container">
63-
<p id="password-strength-meter">&nbsp;</p>
63+
<div id="password-strength-meter" class="password-strength-meter">
64+
<?php /* @escapeNotVerified */ echo __('Password Strength'); ?>:
65+
<span id="password-strength-meter-label">
66+
<?php /* @escapeNotVerified */ echo __('No password'); ?>
67+
</span>
68+
</div>
6469
</div>
6570
</div>
6671
</div>

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@
148148
data-validate="{required:true, 'validate-customer-password':true}"
149149
autocomplete="off">
150150
<div id="password-strength-meter-container">
151-
<p id="password-strength-meter">&nbsp;</p>
151+
<div id="password-strength-meter" class="password-strength-meter">
152+
<?php /* @escapeNotVerified */ echo __('Password Strength'); ?>:
153+
<span id="password-strength-meter-label">
154+
<?php /* @escapeNotVerified */ echo __('No password'); ?>
155+
</span>
156+
</div>
152157
</div>
153158
</div>
154159

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
data-validate="{required:true, 'validate-customer-password':true}"
2525
autocomplete="off">
2626
<div id="password-strength-meter-container">
27-
<p id="password-strength-meter">&nbsp;</p>
27+
<div id="password-strength-meter" class="password-strength-meter">
28+
<?php /* @escapeNotVerified */ echo __('Password Strength'); ?>:
29+
<span id="password-strength-meter-label">
30+
<?php /* @escapeNotVerified */ echo __('No Password'); ?>
31+
</span>
32+
</div>
2833
</div>
2934
</div>
3035
</div>

app/code/Magento/Customer/view/frontend/web/js/password-strength-indicator.js

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@
88
*/
99
define([
1010
'jquery',
11+
'mage/translate',
1112
'Magento_Customer/js/zxcvbn'
12-
], function ($, zxcvbn) {
13+
], function ($, $t, zxcvbn) {
1314
'use strict';
1415

1516
$.widget('mage.passwordStrengthIndicator', {
1617
options: {
1718
defaultClassName: 'password-strength-meter-',
18-
passwordSrengthMeterId: 'password-strength-meter'
19+
passwordStrengthMeterId: 'password-strength-meter-container',
20+
passwordStrengthMeterLabelId: 'password-strength-meter-label'
1921
},
2022

2123
/**
@@ -47,17 +49,45 @@ define([
4749
score = zxcvbn(password).score,
4850
className = this._getClassName(score);
4951

50-
this._displayStrength(className);
52+
this._displayStrength(className, score);
5153
},
5254

5355
/**
5456
* Display strength
5557
* @param {String} className
58+
* @param {Number} score
5659
* @private
5760
*/
58-
_displayStrength: function (className) {
59-
this.element.find('#' + this.options.passwordSrengthMeterId).removeClass();
60-
this.element.find('#' + this.options.passwordSrengthMeterId).addClass(className);
61+
_displayStrength: function (className, score) {
62+
var strengthContainer = this.element.find('#' + this.options.passwordStrengthMeterId),
63+
strengthLabel = '';
64+
65+
strengthContainer.removeClass();
66+
strengthContainer.addClass(className);
67+
68+
switch (score) {
69+
case 1:
70+
strengthLabel = $t('Weak');
71+
break;
72+
73+
case 2:
74+
strengthLabel = $t('Medium');
75+
break;
76+
77+
case 3:
78+
strengthLabel = $t('Strong');
79+
break;
80+
81+
case 4:
82+
strengthLabel = $t('Very Strong');
83+
break;
84+
85+
case 0:
86+
default:
87+
strengthLabel = $t('No password');
88+
}
89+
90+
this.element.find('#' + this.options.passwordStrengthMeterLabelId).text(strengthLabel);
6191
},
6292

6393
/**

app/code/Magento/GroupedImportExport/Test/Unit/Model/Import/Product/Type/Grouped/LinksTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,13 @@ public function attributesDataProvider()
112112
return [
113113
[
114114
'dbAttributes' => [],
115-
'returnedAttibutes' => null
115+
'returnedAttributes' => null
116116
],
117117
[
118118
'dbAttributes' => [
119119
['code' => 2, 'id' => 6, 'type' => 'sometable']
120120
],
121-
'returnedAttibutes' => [
121+
'returnedAttributes' => [
122122
2 => ['id' => 6, 'table' => 'table_name']
123123
]
124124
],
@@ -127,7 +127,7 @@ public function attributesDataProvider()
127127
['code' => 8, 'id' => 11, 'type' => 'sometable1'],
128128
['code' => 4, 'id' => 7, 'type' => 'sometable2']
129129
],
130-
'returnedAttibutes' => [
130+
'returnedAttributes' => [
131131
4 => ['id' => 7, 'table' => 'table_name'],
132132
8 => ['id' => 11, 'table' => 'table_name']
133133
]
@@ -151,15 +151,15 @@ protected function processAttributeGetter($dbAttributes)
151151

152152
/**
153153
* @param array $dbAttributes
154-
* @param array $returnedAttibutes
154+
* @param array $returnedAttributes
155155
*
156156
* @dataProvider attributesDataProvider
157157
*/
158-
public function testGetAttributes($dbAttributes, $returnedAttibutes)
158+
public function testGetAttributes($dbAttributes, $returnedAttributes)
159159
{
160160
$this->processAttributeGetter($dbAttributes);
161161
$actualAttributes = $this->links->getAttributes();
162-
$this->assertEquals($returnedAttibutes, $actualAttributes);
162+
$this->assertEquals($returnedAttributes, $actualAttributes);
163163
}
164164

165165
protected function processBehaviorGetter($behavior)

app/code/Magento/Paypal/view/frontend/templates/express/review.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
<?php echo $block->getChildHtml('details') ?>
134134

135135
<form method="post" id="order-review-form" action="<?php echo $block->escapeUrl($block->getPlaceOrderUrl()); ?>"
136-
class="form">
136+
class="form order-review-form">
137137
<?php echo $block->getChildHtml('agreements'); ?>
138138
<div class="actions-toolbar" id="review-buttons-container">
139139
<div class="primary">

app/code/Magento/Swatches/view/adminhtml/web/css/swatches.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
}
143143

144144
.col-swatch {
145-
.width: 50px;
145+
width: 50px;
146146
}
147147

148148
.swatches-visual-col.unavailable:after {

app/code/Magento/Ui/view/base/ui_component/templates/form/collapsible.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<div xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../Ui/etc/ui_template.xsd">
9-
<div data-role="spinner" data-component="{{getName()}}.{{getName()}}" class="admin__data-grid-loading-mask">
9+
<div data-role="spinner" data-component="{{getName()}}.{{getName()}}" class="admin__form-loading-mask">
1010
<div class="spinner">
1111
<span/><span/><span/><span/><span/><span/><span/><span/>
1212
</div>

app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ define([
602602
_.extend(data.additionalClasses, {
603603
'_fit': data.fit,
604604
'_required': data.required,
605-
'_error': data.error
605+
'_error': data.error,
606+
'_empty': !this.elems().length,
607+
'_no-header': this.columnsHeaderAfterRender || this.collapsibleHeader
606608
});
607609

608610
return data.additionalClasses;

0 commit comments

Comments
 (0)