Skip to content

Commit 802fa5d

Browse files
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #21206: [Backport] Add alt text to saved payment method for accessibility (by @amol2jcommerce) - #21208: [Backport] Fixed Issue #19891 ,Added checks of type_id (by @amol2jcommerce) - #21241: [Backport] issue fixed #20919 Email label and email field not aligned from left � (by @amol2jcommerce) Fixed GitHub Issues: - #21089: No accessible label for vault-saved credit card type (reported by @scottsb) has been fixed in #21206 by @amol2jcommerce in 2.2-develop branch Related commits: 1. f40d139 2. 4a0dc53 - #19891: product_type attribute contains incorrect value in mass import export csv after creating custom type_id attribute. actual type_id value in database gets change with newly created attribute type_id. (reported by @Surabhi-Cedcoss) has been fixed in #21208 by @amol2jcommerce in 2.2-develop branch Related commits: 1. 474cc79 - #20919: Email label and email field not aligned from left for reorder of guest user (reported by @cedarvinda) has been fixed in #21241 by @amol2jcommerce in 2.2-develop branch Related commits: 1. 512430a 2. c105738 3. 0c5f4a1 4. c753b2a
2 parents 03da00c + 93bd02a commit 802fa5d

File tree

5 files changed

+37
-8
lines changed

5 files changed

+37
-8
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public function execute()
100100
$attributeCode
101101
);
102102

103-
if ($attribute->getId() && !$attributeId || $attributeCode === 'product_type') {
103+
if ($attribute->getId() && !$attributeId || $attributeCode === 'product_type' || $attributeCode === 'type_id') {
104104
$message = strlen($this->getRequest()->getParam('attribute_code'))
105105
? __('An attribute with this code already exists.')
106106
: __('An attribute with the same code (%1) already exists.', $attributeCode);

app/code/Magento/Payment/Model/CcConfigProvider.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct(
4444
}
4545

4646
/**
47-
* {@inheritdoc}
47+
* @inheritdoc
4848
*/
4949
public function getConfig()
5050
{
@@ -69,7 +69,7 @@ public function getIcons()
6969
}
7070

7171
$types = $this->ccConfig->getCcAvailableTypes();
72-
foreach (array_keys($types) as $code) {
72+
foreach ($types as $code => $label) {
7373
if (!array_key_exists($code, $this->icons)) {
7474
$asset = $this->ccConfig->createAsset('Magento_Payment::images/cc/' . strtolower($code) . '.png');
7575
$placeholder = $this->assetSource->findSource($asset);
@@ -78,7 +78,8 @@ public function getIcons()
7878
$this->icons[$code] = [
7979
'url' => $asset->getUrl(),
8080
'width' => $width,
81-
'height' => $height
81+
'height' => $height,
82+
'title' => __($label),
8283
];
8384
}
8485
}

app/code/Magento/Payment/Test/Unit/Model/CcConfigProviderTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ public function testGetConfig()
4242
'vi' => [
4343
'url' => 'http://cc.card/vi.png',
4444
'width' => getimagesize($imagesDirectoryPath . 'vi.png')[0],
45-
'height' => getimagesize($imagesDirectoryPath . 'vi.png')[1]
45+
'height' => getimagesize($imagesDirectoryPath . 'vi.png')[1],
46+
'title' => __('Visa'),
4647
],
4748
'ae' => [
4849
'url' => 'http://cc.card/ae.png',
4950
'width' => getimagesize($imagesDirectoryPath . 'ae.png')[0],
50-
'height' => getimagesize($imagesDirectoryPath . 'ae.png')[1]
51+
'height' => getimagesize($imagesDirectoryPath . 'ae.png')[1],
52+
'title' => __('American Express'),
5153
]
5254
]
5355
]
@@ -56,19 +58,25 @@ public function testGetConfig()
5658

5759
$ccAvailableTypesMock = [
5860
'vi' => [
61+
'title' => 'Visa',
5962
'fileId' => 'Magento_Payment::images/cc/vi.png',
6063
'path' => $imagesDirectoryPath . 'vi.png',
6164
'url' => 'http://cc.card/vi.png'
6265
],
6366
'ae' => [
67+
'title' => 'American Express',
6468
'fileId' => 'Magento_Payment::images/cc/ae.png',
6569
'path' => $imagesDirectoryPath . 'ae.png',
6670
'url' => 'http://cc.card/ae.png'
6771
]
6872
];
6973
$assetMock = $this->createMock(\Magento\Framework\View\Asset\File::class);
7074

71-
$this->ccConfigMock->expects($this->once())->method('getCcAvailableTypes')->willReturn($ccAvailableTypesMock);
75+
$this->ccConfigMock->expects($this->once())->method('getCcAvailableTypes')
76+
->willReturn(array_combine(
77+
array_keys($ccAvailableTypesMock),
78+
array_column($ccAvailableTypesMock, 'title')
79+
));
7280

7381
$this->ccConfigMock->expects($this->atLeastOnce())
7482
->method('createAsset')

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
<img data-bind="attr: {
2020
'src': getIcons(getCardType()).url,
2121
'width': getIcons(getCardType()).width,
22-
'height': getIcons(getCardType()).height
22+
'height': getIcons(getCardType()).height,
23+
'alt': getIcons(getCardType()).title
2324
}" class="payment-icon">
2425
<span translate="'ending'"></span>
2526
<span text="getMaskedCard()"></span>

app/design/adminhtml/Magento/backend/Magento_Sales/web/css/source/module/order/_order-account.less

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,22 @@
2727
width: 50%;
2828
}
2929
}
30+
31+
.page-create-order {
32+
.order-details {
33+
&:not(.order-details-existing-customer) {
34+
.order-account-information {
35+
.field-email {
36+
margin-left: -30px;
37+
}
38+
/**
39+
* @codingStandardsIgnoreStart
40+
*/
41+
.field-group_id {
42+
margin-right: 30px;
43+
}
44+
// @codingStandardsIgnoreEnd
45+
}
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)