diff --git a/api/js/etemplate/Et2Email/Et2Email.ts b/api/js/etemplate/Et2Email/Et2Email.ts index 9ec6d3f675..6250482f7d 100644 --- a/api/js/etemplate/Et2Email/Et2Email.ts +++ b/api/js/etemplate/Et2Email/Et2Email.ts @@ -200,6 +200,9 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI this.defaultValidators.push(new IsEmail(this.allowPlaceholder)); + // Set email display to preference, will be overridden by template attribute + this.emailDisplay = this._getEmailDisplayPreference(); + // Additional option for select email, per ticket #79694 this._close_on_select = this.egw().preference("select_multiple_close") != "open"; @@ -261,6 +264,23 @@ export class Et2Email extends Et2InputWidget(LitElement) implements SearchMixinI } } + private _getEmailDisplayPreference() + { + const pref = this.egw().preference("emailTag", "mail") ?? ""; + switch(pref) + { + case "fullemail": + return "full" + default: + case "onlyname": + return "name"; + case "onlyemail": + return "email"; + case "domain": + return "domain"; + } + } + private addOpenListeners() { document.addEventListener('mousedown', this.handleLostFocus); diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index 95b5a4cb3b..5709cce724 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -370,6 +370,7 @@ class mail_hooks 'onlyname' => lang('only name'), 'fullemail' => lang('name and email'), 'onlyemail' => lang('only email'), + 'domain' => lang("Name and domain") ], 'xmlrpc' => True, 'admin' => False, diff --git a/mail/lang/egw_de.lang b/mail/lang/egw_de.lang index 1cf1a39b53..82a227d9a4 100644 --- a/mail/lang/egw_de.lang +++ b/mail/lang/egw_de.lang @@ -374,6 +374,7 @@ move to archive mail de Verschiebe in Archivordner move to trash mail de Verschiebe in Papierkorb moved %1 message(s) from %2 to %3 mail de %1 Nachrichten wurden von %2 nach %3 verschoben moving folders from one mailaccount to another is not supported mail de Verschieben von Ordnern von einem Mailkonto zu einem anderen wird nicht unterstützt +name and domain mail de Name und Domain name and email mail de Name und E-Mail name of account mail de Konten-Bezeichnung name of imap servers (space separated host or host:port) mail de Name der IMAP Server (Leerzeichen getrennt Host oder Host:Port) diff --git a/mail/lang/egw_en.lang b/mail/lang/egw_en.lang index dbca252864..76643a3c80 100644 --- a/mail/lang/egw_en.lang +++ b/mail/lang/egw_en.lang @@ -374,6 +374,7 @@ move to archive mail en Move to archive folder move to trash mail en Move to trash moved %1 message(s) from %2 to %3 mail en Moved %1 message(s) from %2 to %3 moving folders from one mailaccount to another is not supported mail en Moving folders from one email account to another is not supported +name and domain mail en Name and domain name and email mail en Name and email name of account mail en Name of account name of imap servers (space separated host or host:port) mail en Name of IMAP servers (space separated host or host:port)