Skip to content
Snippets Groups Projects
Commit 3c8fa053 authored by Olga Matviienko's avatar Olga Matviienko
Browse files

MAGETWO-39422: [UI] Assistance with applying new style for Credit card validation

parent f92176b0
Branches
No related merge requests found
Showing
with 40 additions and 16 deletions
app/code/Magento/Payment/view/base/web/images/cc/ae.png

1.62 KiB

app/code/Magento/Payment/view/base/web/images/cc/di.png

1.62 KiB

app/code/Magento/Payment/view/base/web/images/cc/dn.png

1.62 KiB

app/code/Magento/Payment/view/base/web/images/cc/jc.png

1.62 KiB

app/code/Magento/Payment/view/base/web/images/cc/mc.png

1.62 KiB

app/code/Magento/Payment/view/base/web/images/cc/sm.png

1.62 KiB

app/code/Magento/Payment/view/base/web/images/cc/un.png

1.62 KiB

app/code/Magento/Payment/view/base/web/images/cc/vi.png

1.62 KiB

...@@ -5,12 +5,6 @@ ...@@ -5,12 +5,6 @@
*/ */
--> -->
<style>
.credit-card-types div.active{
font-weight: bold;
}
</style>
<fieldset data-bind="attr: {class: 'fieldset payment items ccard ' + getCode(), id: 'payment_form_' + getCode()}"> <fieldset data-bind="attr: {class: 'fieldset payment items ccard ' + getCode(), id: 'payment_form_' + getCode()}">
<!-- ko if: (isShowLegend())--> <!-- ko if: (isShowLegend())-->
<legend class="legend"> <legend class="legend">
...@@ -22,18 +16,24 @@ ...@@ -22,18 +16,24 @@
<span><!-- ko text: $t('Credit Card Type')--><!-- /ko --></span> <span><!-- ko text: $t('Credit Card Type')--><!-- /ko --></span>
</label> </label>
<div class="control"> <div class="control">
<div class="credit-card-types"> <ul class="credit-card-types">
<!-- ko foreach: {data: getCcAvailableTypesValues(), as: 'item'} --> <!-- ko foreach: {data: getCcAvailableTypesValues(), as: 'item'} -->
<div data-bind="css: {active: $parent.selectedCardType() == item.value} "> <li class="item" data-bind="css: {_active: $parent.selectedCardType() == item.value} ">
<!-- ko text: item.type --><!-- /ko --> <!-- if picture -->
</div> <img data-bind="attr: {
'src': 'Magento_Payment::images/cc/'+ item.value + '.png',
'alt': item.type
}">
<!-- if NOpicture -->
<span><!-- ko text: item.type --><!-- /ko --></span>
</li>
<!--/ko--> <!--/ko-->
<input type="hidden" </ul>
name="payment[cc_number]" <input type="hidden"
class="input-text" name="payment[cc_number]"
value="" class="input-text"
data-bind="attr: {id: getCode() + '_cc_type'}, value: creditCardType"> value=""
</div> data-bind="attr: {id: getCode() + '_cc_type'}, value: creditCardType">
</div> </div>
</div> </div>
<div class="field number required"> <div class="field number required">
......
...@@ -72,6 +72,30 @@ ...@@ -72,6 +72,30 @@
.payment-option-inner { .payment-option-inner {
margin: 0 0 @indent__base; margin: 0 0 @indent__base;
} }
.credit-card-types {
padding: 0;
.item {
display: inline-block;
list-style: none;
margin: 0 @indent__xs 0 0;
&._active {
font-weight: @font-weight__bold;
img {
-webkit-filter: grayscale(0%);
filter: grayscale(0%);
filter: none;
}
}
}
img {
-webkit-filter: grayscale(100%); // For Webkit browsers
-webkit-transition: all .6s ease; // Fade to color for Chrome and Safari
filter: grayscale(100%);
filter: gray; // For IE 6 - 9
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); // Firefox 10+, Firefox on Android
}
}
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment