Move middle name fieldnames to Identity constants

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

View File

@ -610,7 +610,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.firstName = f;
break;
} else if (!fillFields.middleName && this.isFieldMatch(f[attr],
['m-name', 'middle-name', 'additional-name', 'middle-initial', 'middle-n', 'middle-i'])) {
IdentityAutoFillConstants.MiddlenameFieldNames)) {
fillFields.middleName = f;
break;
} else if (!fillFields.lastName && this.isFieldMatch(f[attr],

View File

@ -200,6 +200,15 @@ export class IdentityAutoFillConstants {
"vorname",
];
static readonly MiddlenameFieldNames: string[] = [
"m-name",
"middle-name",
"additional-name",
"middle-initial",
"middle-n",
"middle-i",
];
static readonly LastnameFieldNames: string[] = [
// English
"l-name",