Move title fieldnames to Identity constants

This commit is contained in:
Daniel James Smith 2022-01-02 14:40:10 +01:00
parent 729150d404
commit c45d1f8f7e
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
2 changed files with 3 additions and 1 deletions

View File

@ -618,7 +618,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.lastName = f;
break;
} else if (!fillFields.title && this.isFieldMatch(f[attr],
['honorific-prefix', 'prefix', 'title'])) {
IdentityAutoFillConstants.TitleFieldNames)) {
fillFields.title = f;
break;
} else if (!fillFields.email && this.isFieldMatch(f[attr],

View File

@ -190,6 +190,8 @@ export class IdentityAutoFillConstants {
"data-recurly",
];
static readonly TitleFieldNames: string[] = ["honorific-prefix", "prefix", "title"];
static readonly FirstnameFieldNames: string[] = [
// English
"f-name",