move button into grid and do not show grid on pageload

This commit is contained in:
David Remer 2020-08-20 08:20:05 +03:00
parent 3edcc17956
commit e900b856d3
2 changed files with 9 additions and 4 deletions

View file

@ -4,7 +4,7 @@
width: 100%;
display: grid;
grid-template-columns: 55% 1fr 1fr;
grid-template-rows: 1fr 1fr;
grid-template-rows: 1fr 1fr auto;
grid-column-gap: 15px;
margin-bottom: 15px;
@ -28,6 +28,11 @@
padding: 5px;
}
button {
grid-row: 3/4;
grid-column: 1/4;
}
label {
line-height: 30px;
}

View file

@ -363,16 +363,16 @@ class SmartButton implements SmartButtonInterface
printf(
'<form id="%1$s">
<div class="ppcp-dcc-credit-card-wrapper">
<div class="ppcp-dcc-credit-card-wrapper" style="display: none">
<label for="ppcp-credit-card-%1$s">%2$s</label>
<span id="ppcp-credit-card-%1$s" class="ppcp-credit-card"></span>
<label for="ppcp-expiration-date-%1$s">%3$s</label>
<span id="ppcp-expiration-date-%1$s" class="ppcp-expiration-date"></span>
<label for="ppcp-cvv-%1$s">%4$s</label>
<span id="ppcp-cvv-%1$s" class="ppcp-cvv"></span>
%5$s
<button class="button alt">%6$s</button>
</div>
%5$s
<button class="button alt">%6$s</button>
</form><div id="payments-sdk__contingency-lightbox"></div>',
esc_attr($id),
esc_html__('Credit Card number', 'woocommerce-paypal-commerce-gateway'),