mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
Move cardholder fieldnames to CC constants
This commit is contained in:
parent
ff6e63a335
commit
37948db899
@ -382,7 +382,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
// ref https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill
|
||||
// ref https://developers.google.com/web/fundamentals/design-and-ux/input/forms/
|
||||
if (!fillFields.cardholderName && this.isFieldMatch(f[attr],
|
||||
['cc-name', 'card-name', 'cardholder-name', 'cardholder', 'name', 'nom'],
|
||||
CreditCardAutoFillConstants.CardHolderFieldNames,
|
||||
['cc-name', 'card-name', 'cardholder-name', 'cardholder', 'tbName'])) {
|
||||
fillFields.cardholderName = f;
|
||||
break;
|
||||
|
@ -50,6 +50,15 @@ export class CreditCardAutoFillConstants {
|
||||
"label-right",
|
||||
];
|
||||
|
||||
static readonly CardHolderFieldNames: string[] = [
|
||||
"cc-name",
|
||||
"card-name",
|
||||
"cardholder-name",
|
||||
"cardholder",
|
||||
"name",
|
||||
"nom",
|
||||
];
|
||||
|
||||
static readonly ExpiryMonthFieldNames: string[] = [
|
||||
"exp-month",
|
||||
"cc-exp-month",
|
||||
|
Loading…
Reference in New Issue
Block a user