Skip to content

Commit f45712c

Browse files
committed
Checkout form updated. Splash added while awaiting redirect.
1 parent 5b6b0d4 commit f45712c

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

src/DirectPaymentForm.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,22 @@ public function render_payment_fields()
8080
padding-left: 0px !important;
8181
}
8282
#pf-overlay {
83-
position: absolute;
84-
background-color: rgba(255,255,255,0.5);
83+
position: fixed;
84+
background-color: rgba(255,255,255,0.95);
8585
background-image: url("<?= get_site_url()."/wp-content/plugins/".Plugin::TEXT_DOMAIN."/assets/fac-visa-mc.png"; ?>");
8686
background-repeat: no-repeat;
8787
background-position: center;
8888
text-align: center;
8989
top: 0;
90+
z-index: 1000;
91+
}
92+
#pf-overlay p {
93+
height: 100%;
94+
justify-content: center;
95+
align-items: center;
96+
display: flex;
97+
margin-top: 50px;
98+
font-weight: bolder;
9099
}
91100
</style>
92101
<?php
@@ -102,9 +111,16 @@ public function render_fieldset_end()
102111

103112
<script>
104113
(function(){
114+
jQuery("form[name='checkout']").off();
105115
jQuery("#place_order").click(function(e) {
106-
jQuery("form[name='checkout']").off();
107-
jQuery("#place_order").hide();
116+
jQuery(this).hide();
117+
118+
let o = jQuery("<div id='pf-overlay'><p>Please wait...</p></div>")
119+
.width(window.innerWidth).height(window.innerHeight);
120+
121+
jQuery("body").prepend(o);
122+
123+
return true;
108124
/*
109125
let f = jQuery("#<?= $fieldsetId; ?>");
110126
let h = f.outerHeight(true);
@@ -131,7 +147,7 @@ public function render_fieldset_end()
131147
jQuery("#pf-overlay").fadeOut();
132148
},5000);
133149
*/
134-
return true;
150+
135151
});
136152
}());
137153
</script>

0 commit comments

Comments
 (0)