mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 23:24:28 -04:00
Improve credit card auto fill
This commit is contained in:
parent
3fce64005c
commit
04d8b0602e
2
public/css/app.css
vendored
2
public/css/app.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -18,7 +18,7 @@
|
||||
"/js/clients/linkify-urls.js": "/js/clients/linkify-urls.js?id=dd6a49267dfe156c3bc9",
|
||||
"/js/clients/payments/braintree-credit-card.js": "/js/clients/payments/braintree-credit-card.js?id=a334dd9257dd510a1feb",
|
||||
"/js/clients/payments/braintree-paypal.js": "/js/clients/payments/braintree-paypal.js?id=37950e8a39281d2f596a",
|
||||
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=ba4d5b7175117ababdb2",
|
||||
"/js/clients/payments/wepay-credit-card.js": "/js/clients/payments/wepay-credit-card.js?id=1533d72d2fdc6ae7b4de",
|
||||
"/js/clients/payment_methods/wepay-bank-account.js": "/js/clients/payment_methods/wepay-bank-account.js?id=8328c6c32a65cd3e8a3d",
|
||||
"/js/clients/payments/paytrace-credit-card.js": "/js/clients/payments/paytrace-credit-card.js?id=59d9913b746fe5a540ff",
|
||||
"/js/clients/payments/mollie-credit-card.js": "/js/clients/payments/mollie-credit-card.js?id=c2cf632fb3cc91b4ff7c",
|
||||
@ -38,7 +38,7 @@
|
||||
"/js/clients/payments/stripe-przelewy24.js": "/js/clients/payments/stripe-przelewy24.js?id=e240b907ad163cac04c0",
|
||||
"/js/clients/payments/stripe-browserpay.js": "/js/clients/payments/stripe-browserpay.js?id=71e49866d66a6d85b88a",
|
||||
"/js/clients/payments/stripe-fpx.js": "/js/clients/payments/stripe-fpx.js?id=3a1cac8fb671c2e4337f",
|
||||
"/css/app.css": "/css/app.css?id=cab8a6526b0f9f71842d",
|
||||
"/css/app.css": "/css/app.css?id=daf6d6885d24b59775d5",
|
||||
"/css/card-js.min.css": "/css/card-js.min.css?id=62afeb675235451543ad",
|
||||
"/vendor/clipboard.min.js": "/vendor/clipboard.min.js?id=ad98572d415d2f245284"
|
||||
}
|
||||
|
@ -32,31 +32,39 @@ class WePayCreditCard {
|
||||
this.errors.textContent = "Cardholder name required.";
|
||||
this.errors.hidden = false;
|
||||
|
||||
return;
|
||||
return false;
|
||||
} else if (this.myCard.CardJs('cardNumber').replace(/[^\d]/g, '') === "") {
|
||||
document.getElementById('card_number').focus();
|
||||
this.errors.textContent = "Card number required.";
|
||||
this.errors.hidden = false;
|
||||
|
||||
return;
|
||||
return false;
|
||||
} else if (this.myCard.CardJs('cvc').replace(/[^\d]/g, '') === "") {
|
||||
document.getElementById('cvv').focus();
|
||||
this.errors.textContent = "CVV number required.";
|
||||
this.errors.hidden = false;
|
||||
|
||||
return;
|
||||
return false;
|
||||
} else if (this.myCard.CardJs('expiryMonth').replace(/[^\d]/g, '') === "") {
|
||||
// document.getElementById('expiry_month').focus();
|
||||
this.errors.textContent = "Expiry Month number required.";
|
||||
this.errors.hidden = false;
|
||||
|
||||
return;
|
||||
return false;
|
||||
} else if (this.myCard.CardJs('expiryYear').replace(/[^\d]/g, '') === "") {
|
||||
// document.getElementById('expiry_year').focus();
|
||||
this.errors.textContent = "Expiry Year number required.";
|
||||
this.errors.hidden = false;
|
||||
|
||||
return;
|
||||
return false;
|
||||
}else if (document.querySelector('input[name="expiry-year"]').value === "") {
|
||||
this.errors.textContent = "Expiry Year number required.";
|
||||
this.errors.hidden = false;
|
||||
|
||||
return false;
|
||||
}else if (document.querySelector('input[name="expiry-month"]').value === "") {
|
||||
this.errors.textContent = "Expiry Month number required.";
|
||||
this.errors.hidden = false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -3,8 +3,8 @@
|
||||
<div class="card-js" id="my-card" data-capture-name="true">
|
||||
<input class="name" id="cardholder_name" name="card-holders-name" placeholder="{{ ctrans('texts.name')}}" required>
|
||||
<input class="card-number my-custom-class" id="card_number" name="card-number" required>
|
||||
<input class="expiry-month" name="expiry-month" id="expiration_month" role="presentation" autocomplete="off" required>
|
||||
<input class="expiry-year" name="expiry-year" id="expiration_year" role="presentation" autocomplete="off" required>
|
||||
<input class="expiry-month" name="expiry-month" id="expiration_month" required>
|
||||
<input class="expiry-year" name="expiry-year" id="expiration_year" required>
|
||||
<input class="cvc" name="cvc" id="cvv" required>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user