Automatically focus credit card input if token is not present

This commit is contained in:
Benjamin Beganović 2022-04-14 10:21:17 +02:00
parent 2c7f521092
commit 67aaf57e19

View File

@ -70,9 +70,12 @@
document.addEventListener('DOMContentLoaded', function() {
let toggleWithToken = document.querySelector('.toggle-payment-with-token');
let toggleWithCard = document.querySelector('#toggle-payment-with-credit-card');
if (toggleWithToken) {
toggleWithToken.click();
} else if (toggleWithCard) {
toggleWithCard.click();
}
});
</script>