Move company fieldnames to Identity constants

This commit is contained in:
Daniel James Smith 2022-01-02 14:57:12 +01:00
parent 0a1b0f5eb9
commit 8f889310c2
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
2 changed files with 8 additions and 1 deletions

View File

@ -667,7 +667,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.username = f;
break;
} else if (!fillFields.company && this.isFieldMatch(f[attr],
['company', 'company-name', 'organization', 'organization-name'])) {
IdentityAutoFillConstants.CompanyFieldNames)) {
fillFields.company = f;
break;
}

View File

@ -299,6 +299,13 @@ export class IdentityAutoFillConstants {
static readonly UserNameFieldNames: string[] = ["user-name", "user-id", "screen-name"];
static readonly CompanyFieldNames: string[] = [
"company",
"company-name",
"organization",
"organization-name",
];
static readonly IsoCountries: { [id: string]: string } = {
afghanistan: "AF",
"aland islands": "AX",