Move city fieldnames to Identity constants
This commit is contained in:
parent
6304964ad4
commit
61dbe5421f
|
@ -647,7 +647,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||||
fillFields.postalCode = f;
|
fillFields.postalCode = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.city && this.isFieldMatch(f[attr],
|
} else if (!fillFields.city && this.isFieldMatch(f[attr],
|
||||||
['city', 'town', 'address-level-2', 'address-city', 'address-town'])) {
|
IdentityAutoFillConstants.CityFieldNames)) {
|
||||||
fillFields.city = f;
|
fillFields.city = f;
|
||||||
break;
|
break;
|
||||||
} else if (!fillFields.state && this.isFieldMatch(f[attr],
|
} else if (!fillFields.state && this.isFieldMatch(f[attr],
|
||||||
|
|
|
@ -262,6 +262,14 @@ export class IdentityAutoFillConstants {
|
||||||
"address-zip-code",
|
"address-zip-code",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
static readonly CityFieldNames: string[] = [
|
||||||
|
"city",
|
||||||
|
"town",
|
||||||
|
"address-level-2",
|
||||||
|
"address-city",
|
||||||
|
"address-town",
|
||||||
|
];
|
||||||
|
|
||||||
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