Move state fieldnames to Identity constants
This commit is contained in:
parent
61dbe5421f
commit
4390989a88
|
@ -651,8 +651,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||||
fillFields.city = f;
|
fillFields.city = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.state && this.isFieldMatch(f[attr],
|
} else if (!fillFields.state && this.isFieldMatch(f[attr],
|
||||||
['state', 'province', 'provence', 'address-level-1', 'address-state',
|
IdentityAutoFillConstants.StateFieldNames)) {
|
||||||
'address-province'])) {
|
|
||||||
fillFields.state = f;
|
fillFields.state = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.country && this.isFieldMatch(f[attr],
|
} else if (!fillFields.country && this.isFieldMatch(f[attr],
|
||||||
|
|
|
@ -270,6 +270,15 @@ export class IdentityAutoFillConstants {
|
||||||
"address-town",
|
"address-town",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly StateFieldNames: string[] = [
|
||||||
|
"state",
|
||||||
|
"province",
|
||||||
|
"provence",
|
||||||
|
"address-level-1",
|
||||||
|
"address-state",
|
||||||
|
"address-province",
|
||||||
|
];
|
||||||
|
|
||||||
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