Move country fieldnames to Identity constants
This commit is contained in:
parent
4390989a88
commit
423ef40aa1
|
@ -655,8 +655,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||||
fillFields.state = f;
|
fillFields.state = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.country && this.isFieldMatch(f[attr],
|
} else if (!fillFields.country && this.isFieldMatch(f[attr],
|
||||||
['country', 'country-code', 'country-name', 'address-country', 'address-country-name',
|
IdentityAutoFillConstants.CountryFieldNames)) {
|
||||||
'address-country-code'])) {
|
|
||||||
fillFields.country = f;
|
fillFields.country = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.phone && this.isFieldMatch(f[attr],
|
} else if (!fillFields.phone && this.isFieldMatch(f[attr],
|
||||||
|
|
|
@ -279,6 +279,15 @@ export class IdentityAutoFillConstants {
|
||||||
"address-province",
|
"address-province",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly CountryFieldNames: string[] = [
|
||||||
|
"country",
|
||||||
|
"country-code",
|
||||||
|
"country-name",
|
||||||
|
"address-country",
|
||||||
|
"address-country-name",
|
||||||
|
"address-country-code",
|
||||||
|
];
|
||||||
|
|
||||||
static readonly IsoCountries: { [id: string]: string } = {
|
static readonly IsoCountries: { [id: string]: string } = {
|
||||||
afghanistan: "AF",
|
afghanistan: "AF",
|
||||||
"aland islands": "AX",
|
"aland islands": "AX",
|
||||||
|
|
Loading…
Reference in New Issue