Skip to content

Commit 81ee51c

Browse files
author
Momotenko,Natalia(nmomotenko)
committed
Merge pull request #250 from magento-webdev/PR
[WebDev + Folks] Bugfixes + Assistance
2 parents 3392976 + 5f52292 commit 81ee51c

File tree

24 files changed

+429
-321
lines changed

24 files changed

+429
-321
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/Customer/Setup/UpgradeData.php

Lines changed: 46 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,52 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
6060
/** @var CustomerSetup $customerSetup */
6161
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
6262

63+
if (version_compare($context->getVersion(), '2.0.6', '<')) {
64+
$customerSetup->updateEntityType(
65+
\Magento\Customer\Model\Customer::ENTITY,
66+
'entity_model',
67+
'Magento\Customer\Model\ResourceModel\Customer'
68+
);
69+
$customerSetup->updateEntityType(
70+
\Magento\Customer\Model\Customer::ENTITY,
71+
'increment_model',
72+
'Magento\Eav\Model\Entity\Increment\NumericValue'
73+
);
74+
$customerSetup->updateEntityType(
75+
\Magento\Customer\Model\Customer::ENTITY,
76+
'entity_attribute_collection',
77+
'Magento\Customer\Model\ResourceModel\Attribute\Collection'
78+
);
79+
$customerSetup->updateEntityType(
80+
'customer_address',
81+
'entity_model',
82+
'Magento\Customer\Model\ResourceModel\Address'
83+
);
84+
$customerSetup->updateEntityType(
85+
'customer_address',
86+
'entity_attribute_collection',
87+
'Magento\Customer\Model\ResourceModel\Address\Attribute\Collection'
88+
);
89+
$customerSetup->updateAttribute(
90+
'customer_address',
91+
'country_id',
92+
'source_model',
93+
'Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country'
94+
);
95+
$customerSetup->updateAttribute(
96+
'customer_address',
97+
'region',
98+
'backend_model',
99+
'Magento\Customer\Model\ResourceModel\Address\Attribute\Backend\Region'
100+
);
101+
$customerSetup->updateAttribute(
102+
'customer_address',
103+
'region_id',
104+
'source_model',
105+
'Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Region'
106+
);
107+
}
108+
63109
if (version_compare($context->getVersion(), '2.0.1', '<')) {
64110
$entityAttributes = [
65111
'customer' => [
@@ -240,51 +286,6 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
240286
];
241287
$this->upgradeAttributes($entityAttributes, $customerSetup);
242288
}
243-
if (version_compare($context->getVersion(), '2.0.6', '<')) {
244-
$customerSetup->updateEntityType(
245-
\Magento\Customer\Model\Customer::ENTITY,
246-
'entity_model',
247-
'Magento\Customer\Model\ResourceModel\Customer'
248-
);
249-
$customerSetup->updateEntityType(
250-
\Magento\Customer\Model\Customer::ENTITY,
251-
'increment_model',
252-
'Magento\Eav\Model\Entity\Increment\NumericValue'
253-
);
254-
$customerSetup->updateEntityType(
255-
\Magento\Customer\Model\Customer::ENTITY,
256-
'entity_attribute_collection',
257-
'Magento\Customer\Model\ResourceModel\Attribute\Collection'
258-
);
259-
$customerSetup->updateEntityType(
260-
'customer_address',
261-
'entity_model',
262-
'Magento\Customer\Model\ResourceModel\Address'
263-
);
264-
$customerSetup->updateEntityType(
265-
'customer_address',
266-
'entity_attribute_collection',
267-
'Magento\Customer\Model\ResourceModel\Address\Attribute\Collection'
268-
);
269-
$customerSetup->updateAttribute(
270-
'customer_address',
271-
'country_id',
272-
'source_model',
273-
'Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Country'
274-
);
275-
$customerSetup->updateAttribute(
276-
'customer_address',
277-
'region',
278-
'backend_model',
279-
'Magento\Customer\Model\ResourceModel\Address\Attribute\Backend\Region'
280-
);
281-
$customerSetup->updateAttribute(
282-
'customer_address',
283-
'region_id',
284-
'source_model',
285-
'Magento\Customer\Model\ResourceModel\Address\Attribute\Source\Region'
286-
);
287-
}
288289

289290
if (version_compare($context->getVersion(), '2.0.6', '<')) {
290291
$setup->getConnection()->delete(

0 commit comments

Comments
 (0)