Move cardNumber fieldnames to CC constants
This commit is contained in:
parent
37948db899
commit
ec60979ee2
|
@ -387,8 +387,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||||
fillFields.cardholderName = f;
|
fillFields.cardholderName = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.number && this.isFieldMatch(f[attr],
|
} else if (!fillFields.number && this.isFieldMatch(f[attr],
|
||||||
['cc-number', 'cc-num', 'card-number', 'card-num', 'number', 'cc', 'cc-no', 'card-no',
|
CreditCardAutoFillConstants.CardNumberFieldNames,
|
||||||
'credit-card', 'numero-carte', 'carte', 'carte-credit', 'num-carte', 'cb-num'],
|
|
||||||
['cc-number', 'cc-num', 'card-number', 'card-num', 'cc-no', 'card-no', 'numero-carte',
|
['cc-number', 'cc-num', 'card-number', 'card-num', 'cc-no', 'card-no', 'numero-carte',
|
||||||
'num-carte', 'cb-num'])) {
|
'num-carte', 'cb-num'])) {
|
||||||
fillFields.number = f;
|
fillFields.number = f;
|
||||||
|
|
|
@ -59,6 +59,23 @@ export class CreditCardAutoFillConstants {
|
||||||
"nom",
|
"nom",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly CardNumberFieldNames: string[] = [
|
||||||
|
"cc-number",
|
||||||
|
"cc-num",
|
||||||
|
"card-number",
|
||||||
|
"card-num",
|
||||||
|
"number",
|
||||||
|
"cc",
|
||||||
|
"cc-no",
|
||||||
|
"card-no",
|
||||||
|
"credit-card",
|
||||||
|
"numero-carte",
|
||||||
|
"carte",
|
||||||
|
"carte-credit",
|
||||||
|
"num-carte",
|
||||||
|
"cb-num",
|
||||||
|
];
|
||||||
|
|
||||||
static readonly ExpiryMonthFieldNames: string[] = [
|
static readonly ExpiryMonthFieldNames: string[] = [
|
||||||
"exp-month",
|
"exp-month",
|
||||||
"cc-exp-month",
|
"cc-exp-month",
|
||||||
|
|
Loading…
Reference in New Issue