Skip to content

Commit b895ea1

Browse files
author
Yu Tang
committed
Merge remote-tracking branch 'mainline/develop' into develop
2 parents 8d98c7e + 3f148f9 commit b895ea1

File tree

37 files changed

+599
-376
lines changed

37 files changed

+599
-376
lines changed

app/code/Magento/BraintreeTwo/view/adminhtml/layout/sales_order_create_index.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
*/
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
9-
<head>
10-
<css src="Magento_BraintreeTwo::css/styles.css"/>
11-
</head>
129
<body>
1310
<referenceBlock name="order_create_billing_form">
1411
<action method="setMethodFormTemplate">

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

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,12 @@ $ccType = $block->getInfoData('cc_type');
3636
<span><?php echo $block->escapeHtml(__('Credit Card Number')); ?></span>
3737
</label>
3838
<div class="admin__field-control control">
39-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_number" class="control-container">
39+
<div id="<?php /* @noEscape */ echo $code; ?>_cc_number" class="admin__control-text hosted-control">
4040
<span class="icon-type"></span>
4141
</div>
42+
<div class="hosted-error admin__field-error">
43+
<?php echo $block->escapeHtml(__('Please enter valid Credit Card Number')); ?>
44+
</div>
4245
</div>
4346
</div>
4447

@@ -47,9 +50,15 @@ $ccType = $block->getInfoData('cc_type');
4750
<span><?php echo $block->escapeHtml(__('Expiration Date')); ?></span>
4851
</label>
4952
<div class="admin__field-control control">
50-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_exp_month" class="control-container select-date"></div>
51-
<span class="inline-separator">/</span>
52-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_exp_year" class="control-container select-date"></div>
53+
<div class="hosted-date-wrap">
54+
<div id="<?php /* @noEscape */ echo $code; ?>_cc_exp_month"
55+
class="admin__control-text hosted-control hosted-date"></div>
56+
57+
<div id="<?php /* @noEscape */ echo $code; ?>_cc_exp_year"
58+
class="admin__control-text hosted-control hosted-date"></div>
59+
60+
<div class="hosted-error admin__field-error"><?php echo $block->escapeHtml(__('Please enter valid Expiration Date')); ?></div>
61+
</div>
5362
</div>
5463
</div>
5564
<?php if($block->hasVerification()): ?>
@@ -58,7 +67,12 @@ $ccType = $block->getInfoData('cc_type');
5867
<span><?php echo $block->escapeHtml(__('Card Verification Number')); ?></span>
5968
</label>
6069
<div class="admin__field-control control">
61-
<div id="<?php /* @noEscape */ echo $code; ?>_cc_cid" class="control-container"></div>
70+
<div id="<?php /* @noEscape */ echo $code; ?>_cc_cid"
71+
class="admin__control-text hosted-control hosted-cid"></div>
72+
73+
<div class="hosted-error admin__field-error">
74+
<?php echo $block->escapeHtml(__('Please enter valid Card Verification Number')); ?>
75+
</div>
6276
</div>
6377
</div>
6478
<?php endif; ?>

app/code/Magento/BraintreeTwo/view/adminhtml/web/css/styles.css

Lines changed: 0 additions & 57 deletions
This file was deleted.
Binary file not shown.

app/code/Magento/BraintreeTwo/view/frontend/layout/checkout_index_index.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
*/
77
-->
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
9-
<head>
10-
<css src="Magento_BraintreeTwo::css/styles.css"/>
11-
</head>
129
<body>
1310
<referenceBlock name="checkout.root">
1411
<arguments>

app/code/Magento/BraintreeTwo/view/frontend/web/css/styles.css

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

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* See COPYING.txt for license details.
55
*/
66
-->
7-
<div class="payment-method" data-bind="css: {'_active': isActive() && scriptLoaded()}">
7+
<div data-bind="attr: {class: 'payment-method payment-method-' + getCode()}, css: {'_active': isActive() && scriptLoaded()}">
88
<div class="payment-method-title field choice">
99
<input type="radio"
1010
name="payment[method]"
@@ -61,25 +61,23 @@
6161
<span><!-- ko i18n: 'Credit Card Number'--><!-- /ko --></span>
6262
</label>
6363
<div class="control">
64-
<div data-bind="attr: {id: getCode() + '_cc_number'}"></div>
64+
<div data-bind="attr: {id: getCode() + '_cc_number'}" class="hosted-control"></div>
65+
<div class="hosted-error"><!-- ko i18n: 'Please enter valid Credit Card Number'--><!-- /ko --></div>
6566
</div>
6667
</div>
6768
<div class="field number required">
6869
<label data-bind="attr: {for: getCode() + '_expiration'}" class="label">
6970
<span><!-- ko i18n: 'Expiration Date'--><!-- /ko --></span>
7071
</label>
7172
<div class="control">
72-
<div class="fields group group-2">
73-
<div class="field no-label month">
74-
<div class="control">
75-
<div data-bind="attr: {id: getCode() + '_expirationMonth'}"></div>
76-
</div>
77-
</div>
78-
<div class="field no-label year">
79-
<div class="control">
80-
<div data-bind="attr: {id: getCode() + '_expirationYear'}"></div>
81-
</div>
82-
</div>
73+
<div class="hosted-date-wrap">
74+
<div data-bind="attr: {id: getCode() + '_expirationMonth'}"
75+
class="hosted-control hosted-date"></div>
76+
77+
<div data-bind="attr: {id: getCode() + '_expirationYear'}"
78+
class="hosted-control hosted-date"></div>
79+
80+
<div class="hosted-error"><!-- ko i18n: 'Please enter valid Expiration Date'--><!-- /ko --></div>
8381
</div>
8482
</div>
8583
</div>
@@ -89,7 +87,9 @@
8987
<span><!-- ko i18n: 'Card Verification Number'--><!-- /ko --></span>
9088
</label>
9189
<div class="control _with-tooltip">
92-
<div data-bind="attr: {id: getCode() + '_cc_cid'}"></div>
90+
<div data-bind="attr: {id: getCode() + '_cc_cid'}" class="hosted-control hosted-cid"></div>
91+
<div class="hosted-error"><!-- ko i18n: 'Please enter valid Card Verification Number'--><!-- /ko --></div>
92+
9393
<div class="field-tooltip toggle">
9494
<span class="field-tooltip-action action-cvv"
9595
tabindex="0"

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,3 +306,10 @@ jQuery(window).load(function() {
306306

307307
});
308308
</script>
309+
<script type="text/x-magento-init">
310+
{
311+
"*": {
312+
"Magento_Bundle/js/bundle-type-handler": {}
313+
}
314+
}
315+
</script>

app/code/Magento/Catalog/Block/Adminhtml/Category/Tab/Attributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
namespace Magento\Catalog\Block\Adminhtml\Category\Tab;
1313

14-
class Attributes extends \Magento\Backend\Block\Widget\Form\Generic
14+
class Attributes extends \Magento\Catalog\Block\Adminhtml\Form
1515
{
1616
/**
1717
* Retrieve Category object

app/code/Magento/Catalog/Setup/InstallData.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
8989
$categorySetup->updateAttributeGroup($entityTypeId, $attributeSetId, $attributeGroupId, 'sort_order', '10');
9090

9191
$groups = [
92-
'display' => ['name' => 'Display Settings', 'sort' => 20, 'id' => null],
93-
'design' => ['name' => 'Custom Design', 'sort' => 30, 'id' => null],
92+
'display' => ['name' => 'Display Settings', 'code' => 'display-settings', 'sort' => 20, 'id' => null],
93+
'design' => ['name' => 'Custom Design', 'code' => 'custom-design', 'sort' => 30, 'id' => null],
9494
];
9595

9696
foreach ($groups as $k => $groupProp) {
9797
$categorySetup->addAttributeGroup($entityTypeId, $attributeSetId, $groupProp['name'], $groupProp['sort']);
98-
$groups[$k]['id'] = $categorySetup->getAttributeGroupId($entityTypeId, $attributeSetId, $groupProp['name']);
98+
$groups[$k]['id'] = $categorySetup->getAttributeGroupId($entityTypeId, $attributeSetId, $groupProp['code']);
9999
}
100100

101101
// update attributes group and sort
@@ -183,25 +183,25 @@ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
183183
$tabNames = [
184184
'General' => [
185185
'attribute_group_name' => $newGeneralTabName,
186-
'attribute_group_code' => preg_replace('/[^a-z0-9]+/', '-', strtolower($newGeneralTabName)),
186+
'attribute_group_code' => $categorySetup->convertToAttributeGroupCode($newGeneralTabName),
187187
'tab_group_code' => 'basic',
188188
'sort_order' => 10,
189189
],
190190
'Images' => [
191191
'attribute_group_name' => $newImagesTabName,
192-
'attribute_group_code' => preg_replace('/[^a-z0-9]+/', '-', strtolower($newImagesTabName)),
192+
'attribute_group_code' => $categorySetup->convertToAttributeGroupCode($newImagesTabName),
193193
'tab_group_code' => 'basic',
194194
'sort_order' => 20,
195195
],
196196
'Meta Information' => [
197197
'attribute_group_name' => $newMetaTabName,
198-
'attribute_group_code' => preg_replace('/[^a-z0-9]+/', '-', strtolower($newMetaTabName)),
198+
'attribute_group_code' => $categorySetup->convertToAttributeGroupCode($newMetaTabName),
199199
'tab_group_code' => 'basic',
200200
'sort_order' => 30,
201201
],
202202
'Prices' => [
203203
'attribute_group_name' => $newPriceTabName,
204-
'attribute_group_code' => preg_replace('/[^a-z0-9]+/', '-', strtolower($newPriceTabName)),
204+
'attribute_group_code' => $categorySetup->convertToAttributeGroupCode($newPriceTabName),
205205
'tab_group_code' => 'advanced',
206206
'sort_order' => 40,
207207
],

0 commit comments

Comments
 (0)