Skip to content

Commit 2028328

Browse files
committed
Merge branch 'MC-40818' of github.com:magento-cia/magento2ce into cia-2.3.7-3112021
2 parents f5f90c1 + 0680fe9 commit 2028328

File tree

9 files changed

+190
-80
lines changed

9 files changed

+190
-80
lines changed

app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
4040
'validate-cc-type-select':'#<?= /* @noEscape */ $code ?>_cc_number'
4141
}">
4242
<option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
43-
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
43+
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
4444
<option value="<?= $block->escapeHtmlAttr($typeCode) ?>"
45-
<?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif; ?>>
45+
<?php if ($typeCode == $ccType): ?>selected="selected"<?php endif; ?>>
4646
<?= $block->escapeHtml($typeName) ?>
4747
</option>
4848
<?php endforeach; ?>
@@ -57,6 +57,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
5757
<div class="admin__field-control">
5858
<input type="text" id="<?= /* @noEscape */ $code ?>_cc_number"
5959
name="payment[cc_number]"
60+
oncopy="return false;"
61+
oncut="return false;"
62+
onpaste="return false;"
6063
data-validate="{
6164
'required-number':true,
6265
'validate-cc-number':'#<?= /* @noEscape */ $code ?>_cc_type',
@@ -80,9 +83,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
8083
'required':true,
8184
'validate-cc-exp':'#<?= /* @noEscape */ $code ?>_expiration_yr'
8285
}">
83-
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
86+
<?php foreach ($block->getCcMonths() as $k => $v): ?>
8487
<option value="<?= $block->escapeHtmlAttr($k) ?>"
85-
<?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif; ?>>
88+
<?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif; ?>>
8689
<?= $block->escapeHtml($v) ?>
8790
</option>
8891
<?php endforeach; ?>
@@ -92,17 +95,17 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
9295
class="admin__control-select admin__control-select-year"
9396
data-container="<?= /* @noEscape */ $code ?>-cc-year"
9497
data-validate="{required:true}">
95-
<?php foreach ($block->getCcYears() as $k => $v) : ?>
98+
<?php foreach ($block->getCcYears() as $k => $v): ?>
9699
<option value="<?= /* @noEscape */ $k ? $block->escapeHtmlAttr($k) : '' ?>"
97-
<?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif; ?>>
100+
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif; ?>>
98101
<?= $block->escapeHtml($v) ?>
99102
</option>
100103
<?php endforeach; ?>
101104
</select>
102105
</div>
103106
</div>
104107

105-
<?php if ($block->hasVerification()) : ?>
108+
<?php if ($block->hasVerification()): ?>
106109
<div class="admin__field _required field-cvv">
107110
<label class="admin__field-label"
108111
for="<?= /* @noEscape */ $code ?>_cc_cid"
@@ -113,6 +116,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
113116
<div class="admin__field-control">
114117
<input type="text"
115118
data-container="<?= /* @noEscape */ $code ?>-cc-cvv"
119+
oncopy="return false;"
120+
oncut="return false;"
121+
onpaste="return false;"
116122
title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
117123
class="admin__control-text cvv"
118124
id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]"

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

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
2222
<select id="<?= /* @noEscape */ $code ?>_cc_type" name="payment[cc_type]"
2323
class="required-entry validate-cc-type-select admin__control-select">
2424
<option value=""></option>
25-
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
26-
<option value="<?= $block->escapeHtmlAttr($typeCode) ?>" <?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif ?>>
25+
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
26+
<option value="<?= $block->escapeHtmlAttr($typeCode) ?>"
27+
<?php if ($typeCode == $ccType): ?>selected="selected"<?php endif ?>>
2728
<?= $block->escapeHtml($typeName) ?>
2829
</option>
2930
<?php endforeach ?>
@@ -35,8 +36,14 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
3536
<span><?= $block->escapeHtml(__('Credit Card Number')) ?></span>
3637
</label>
3738
<div class="admin__field-control">
38-
<input type="text" id="<?= /* @noEscape */ $code ?>_cc_number" name="payment[cc_number]"
39-
title="<?= $block->escapeHtmlAttr(__('Credit Card Number')) ?>" class="admin__control-text validate-cc-number"
39+
<input type="text"
40+
id="<?= /* @noEscape */ $code ?>_cc_number"
41+
name="payment[cc_number]"
42+
oncopy="return false;"
43+
oncut="return false;"
44+
onpaste="return false;"
45+
title="<?= $block->escapeHtmlAttr(__('Credit Card Number')) ?>"
46+
class="admin__control-text validate-cc-number"
4047
value="<?= /* @noEscape */ $block->getInfoData('cc_number') ?>"/>
4148
</div>
4249
</div>
@@ -47,35 +54,40 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
4754
<div class="admin__field-control">
4855
<select id="<?= /* @noEscape */ $code ?>_cc_exp_month" name="payment[cc_exp_month]"
4956
class="admin__control-select admin__control-select-month validate-cc-exp required-entry">
50-
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
57+
<?php foreach ($block->getCcMonths() as $k => $v): ?>
5158
<option value="<?= $block->escapeHtmlAttr($k) ?>"
52-
<?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif ?>>
59+
<?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif ?>>
5360
<?= $block->escapeHtml($v) ?>
5461
</option>
5562
<?php endforeach; ?>
5663
</select>
5764
<select id="<?= /* @noEscape */ $code ?>_cc_exp_year" name="payment[cc_exp_year]"
5865
class="admin__control-select admin__control-select-year required-entry">
59-
<?php foreach ($block->getCcYears() as $k => $v) : ?>
66+
<?php foreach ($block->getCcYears() as $k => $v): ?>
6067
<option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
61-
<?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif ?>>
68+
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif ?>>
6269
<?= $block->escapeHtml($v) ?>
6370
</option>
6471
<?php endforeach ?>
6572
</select>
6673
</div>
6774
</div>
6875

69-
<?php if ($block->isCvvEnabled()) : ?>
76+
<?php if ($block->isCvvEnabled()): ?>
7077
<div class="field-number required admin__field _required">
7178
<label class="admin__field-label" for="<?= /* @noEscape */ $code ?>_cc_cid">
7279
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
7380
</label>
7481
<div class="admin__field-control">
75-
<input type="text" title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
82+
<input type="text"
83+
title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
84+
oncopy="return false;"
85+
oncut="return false;"
86+
onpaste="return false;"
7687
class="required-entry validate-cc-cvn admin__control-cvn admin__control-text"
7788
id="<?= /* @noEscape */ $code ?>_cc_cid"
78-
name="payment[cc_cid]" value="<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"/>
89+
name="payment[cc_cid]"
90+
value="<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"/>
7991
</div>
8092
</div>
8193
<?php endif; ?>

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

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
2222
<select id="<?= /* @noEscape */ $code ?>_cc_type" name="payment[cc_type]"
2323
class="required-entry validate-cc-type-select admin__control-select">
2424
<option value=""></option>
25-
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
26-
<option value="<?= $block->escapeHtmlAttr($typeCode) ?>" <?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif ?>>
25+
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
26+
<option value="<?= $block->escapeHtmlAttr($typeCode) ?>"
27+
<?php if ($typeCode == $ccType): ?>selected="selected"<?php endif ?>>
2728
<?= $block->escapeHtml($typeName) ?>
2829
</option>
2930
<?php endforeach ?>
@@ -35,8 +36,13 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
3536
<span><?= $block->escapeHtml(__('Credit Card Number')) ?></span>
3637
</label>
3738
<div class="admin__field-control">
38-
<input type="text" id="<?= /* @noEscape */ $code ?>_cc_number" name="payment[cc_number]"
39-
title="<?= $block->escapeHtmlAttr(__('Credit Card Number')) ?>" class="admin__control-text validate-cc-number"
39+
<input type="text" id="<?= /* @noEscape */ $code ?>_cc_number"
40+
name="payment[cc_number]"
41+
oncopy="return false;"
42+
oncut="return false;"
43+
onpaste="return false;"
44+
title="<?= $block->escapeHtmlAttr(__('Credit Card Number')) ?>"
45+
class="admin__control-text validate-cc-number"
4046
value="<?= /* @noEscape */ $block->getInfoData('cc_number') ?>"/>
4147
</div>
4248
</div>
@@ -47,35 +53,40 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
4753
<div class="admin__field-control">
4854
<select id="<?= /* @noEscape */ $code ?>_expiration" name="payment[cc_exp_month]"
4955
class="admin__control-select admin__control-select-month validate-cc-exp required-entry">
50-
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
56+
<?php foreach ($block->getCcMonths() as $k => $v): ?>
5157
<option value="<?= $block->escapeHtmlAttr($k) ?>"
52-
<?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif ?>>
58+
<?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif ?>>
5359
<?= $block->escapeHtml($v) ?>
5460
</option>
5561
<?php endforeach; ?>
5662
</select>
5763
<select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
5864
class="admin__control-select admin__control-select-year required-entry">
59-
<?php foreach ($block->getCcYears() as $k => $v) : ?>
65+
<?php foreach ($block->getCcYears() as $k => $v): ?>
6066
<option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
61-
<?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif ?>>
67+
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif ?>>
6268
<?= $block->escapeHtml($v) ?>
6369
</option>
6470
<?php endforeach ?>
6571
</select>
6672
</div>
6773
</div>
6874

69-
<?php if ($block->hasVerification()) : ?>
75+
<?php if ($block->hasVerification()): ?>
7076
<div class="field-number required admin__field _required">
7177
<label class="admin__field-label" for="<?= /* @noEscape */ $code ?>_cc_cid">
7278
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
7379
</label>
7480
<div class="admin__field-control">
75-
<input type="text" title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
81+
<input type="text"
82+
title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
83+
oncopy="return false;"
84+
oncut="return false;"
85+
onpaste="return false;"
7686
class="required-entry validate-cc-cvn admin__control-cvn admin__control-text"
7787
id="<?= /* @noEscape */ $code ?>_cc_cid"
78-
name="payment[cc_cid]" value="<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"/>
88+
name="payment[cc_cid]"
89+
value="<?= /* @noEscape */ $block->getInfoData('cc_cid') ?>"/>
7990
</div>
8091
</div>
8192
<?php endif; ?>

app/code/Magento/Payment/view/adminhtml/templates/transparent/form.phtml

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
3131
"orderSaveUrl":"<?= $block->escapeUrl($block->getOrderUrl()) ?>",
3232
"cgiUrl":"<?= $block->escapeUrl($block->getCgiUrl()) ?>",
3333
"expireYearLength":"<?= $block->escapeHtml($block->getMethodConfigData('cc_year_length')) ?>",
34-
"nativeAction":"<?= $block->escapeUrl($block->getUrl('*/*/save', ['_secure' => $block->getRequest()->isSecure()])) ?>"
34+
"nativeAction":"<?= $block->escapeUrl(
35+
$block->getUrl('*/*/save', ['_secure' => $block->getRequest()->isSecure()])
36+
) ?>"
3537
}, "validation":[]}'
3638
style="display: none;">
3739
<div class="admin__field _required">
@@ -43,12 +45,16 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
4345
<select id="<?= /* @noEscape */ $code ?>_cc_type"
4446
data-container="<?= /* @noEscape */ $code ?>-cc-type"
4547
name="payment[cc_type]"
46-
data-validate='{required:true, "validate-cc-type-select":"#<?= /* @noEscape */ $code ?>_cc_number"}'
48+
data-validate='{
49+
required:true,
50+
"validate-cc-type-select":"#<?= /* @noEscape */ $code ?>_cc_number"
51+
}'
4752
class="admin__control-select">
4853
<option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
49-
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
54+
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
5055
<option
51-
value="<?= $block->escapeHtmlAttr($typeCode) ?>"<?php if ($typeCode == $ccType) : ?> selected="selected"<?php endif ?>>
56+
value="<?= $block->escapeHtmlAttr($typeCode) ?>"
57+
<?php if ($typeCode == $ccType): ?> selected="selected"<?php endif ?>>
5258
<?= $block->escapeHtml($typeName) ?>
5359
</option>
5460
<?php endforeach ?>
@@ -64,7 +70,11 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
6470
<div class="admin__field-control">
6571
<input type="text" id="<?= /* @noEscape */ $code ?>_cc_number"
6672
data-container="<?= /* @noEscape */ $code ?>-cc-number"
67-
name="payment[cc_number]" title="<?= $block->escapeHtmlAttr(__('Credit Card Number')) ?>"
73+
oncopy="return false;"
74+
oncut="return false;"
75+
onpaste="return false;"
76+
name="payment[cc_number]"
77+
title="<?= $block->escapeHtmlAttr(__('Credit Card Number')) ?>"
6878
class="admin__control-text"
6979
value=""
7080
data-validate='{
@@ -86,10 +96,10 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
8696
data-container="<?= /* @noEscape */ $code ?>-cc-month"
8797
class="admin__control-select admin__control-select-month"
8898
data-validate='{required:true, "validate-cc-exp":"#<?= /* @noEscape */ $code ?>_expiration_yr"}'>
89-
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
99+
<?php foreach ($block->getCcMonths() as $k => $v): ?>
90100
<option
91101
value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
92-
<?php if ($k == $ccExpMonth) : ?> selected="selected"<?php endif; ?>>
102+
<?php if ($k == $ccExpMonth): ?> selected="selected"<?php endif; ?>>
93103
<?= $block->escapeHtml($v) ?>
94104
</option>
95105
<?php endforeach ?>
@@ -98,29 +108,37 @@ $ccExpMonth = $block->getInfoData('cc_exp_month');
98108
<select id="<?= /* @noEscape */ $code ?>_expiration_yr" name="payment[cc_exp_year]"
99109
class="admin__control-select admin__control-select-year"
100110
data-container="<?= /* @noEscape */ $code ?>-cc-year" data-validate='{required:true}'>
101-
<?php foreach ($block->getCcYears() as $k => $v) : ?>
111+
<?php foreach ($block->getCcYears() as $k => $v): ?>
102112
<option
103113
value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
104-
<?php if ($k == $ccExpYear) : ?> selected="selected"<?php endif ?>>
114+
<?php if ($k == $ccExpYear): ?> selected="selected"<?php endif ?>>
105115
<?= $block->escapeHtml($v) ?>
106116
</option>
107117
<?php endforeach ?>
108118
</select>
109119
</div>
110120
</div>
111-
<?php if ($block->hasVerification()) : ?>
121+
<?php if ($block->hasVerification()): ?>
112122
<div class="admin__field _required field-cvv" id="<?= /* @noEscape */ $code ?>_cc_type_cvv_div">
113123
<label for="<?= /* @noEscape */ $code ?>_cc_cid" class="admin__field-label">
114124
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>
115125
</label>
116126

117127
<div class="admin__field-control">
118-
<input type="text" title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
128+
<input type="text"
129+
title="<?= $block->escapeHtmlAttr(__('Card Verification Number')) ?>"
130+
oncopy="return false;"
131+
oncut="return false;"
132+
onpaste="return false;"
119133
data-container="<?= /* @noEscape */ $code ?>-cc-cvv"
120134
class="admin__control-text cvv"
121-
id="<?= /* @noEscape */ $code ?>_cc_cid" name="payment[cc_cid]"
135+
id="<?= /* @noEscape */ $code ?>_cc_cid"
136+
name="payment[cc_cid]"
122137
value=""
123-
data-validate='{"required-number":true, "validate-cc-cvn":"#<?= /* @noEscape */ $code ?>_cc_type"}'
138+
data-validate='{
139+
"required-number":true,
140+
"validate-cc-cvn":"#<?= /* @noEscape */ $code ?>_cc_type"
141+
}'
124142
autocomplete="off"/>
125143
</div>
126144
</div>

0 commit comments

Comments
 (0)