add credit-card-wrapper element

This commit is contained in:
David Remer 2020-07-20 11:20:12 +03:00
parent a4b976c59d
commit e2dfaf7f99
2 changed files with 25 additions and 15 deletions

View file

@ -1,21 +1,29 @@
#ppcp-hosted-fields,
#ppcp-hosted-fields-mini-cart {
display: table !important;
div {
display: table-row;
}
label, span {
display: table-cell;
height: 30px;
padding: 0;
margin: 0;
overflow: hidden;
position: relative;
vertical-align: bottom;
}
label {
line-height: 30px;
.ppcp-dcc-credit-card-wrapper {
width: 100%;
display: table !important;
div {
display: table-row;
}
label, span {
display: table-cell;
height: 30px;
padding: 0;
margin: 0;
overflow: hidden;
position: relative;
vertical-align: bottom;
}
label {
line-height: 30px;
}
}
}

View file

@ -89,6 +89,7 @@ class SmartButton implements SmartButtonInterface
wp_enqueue_style('ppcp-hosted-fields');
printf(
'<form id="%1$s">
<div class="ppcp-dcc-credit-card-wrapper">
<div>
<label for="ppcp-credit-card-%1$s">%2$s</label>
<span id="ppcp-credit-card-%1$s" class="ppcp-credit-card"></span>
@ -99,6 +100,7 @@ class SmartButton implements SmartButtonInterface
<label for="ppcp-cvv-%1$s">%4$s</label>
<span id="ppcp-cvv-%1$s" class="ppcp-cvv"></span>
</div>
</div>
<button>%5$s</button>
</form><div id="payments-sdk__contingency-lightbox"></div>',
esc_attr($id),