mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +01:00
fix doubled domain in brackets for emailDisplay="domain"
This commit is contained in:
parent
b77eb4d4ed
commit
80dd602e66
@ -54,9 +54,18 @@ export class Et2UrlEmailReadonly extends Et2UrlReadonly
|
|||||||
{
|
{
|
||||||
attrs.onclick = () =>
|
attrs.onclick = () =>
|
||||||
{
|
{
|
||||||
let email;
|
let email=this._value;
|
||||||
if (IsEmail.EMAIL_PREG.exec(email=this._value) ||
|
if (!IsEmail.EMAIL_PREG.exec(email))
|
||||||
IsEmail.EMAIL_PREG.exec(email = '"' + this._value + '" <' + this.statustext + '>'))
|
{
|
||||||
|
let name = this._value;
|
||||||
|
// do we need to remove the domain in brackets again?
|
||||||
|
if ((this.emailDisplay === 'preference' ? window.egw.preference("emailTag", "mail") : this.emailDisplay) === 'domain')
|
||||||
|
{
|
||||||
|
name = this._value.replace(/ \([^@. ]+\.[^@ )]+\)$/, '');
|
||||||
|
}
|
||||||
|
email = '"' + name + '" <' + this.statustext + '>'
|
||||||
|
}
|
||||||
|
if (IsEmail.EMAIL_PREG.exec(email))
|
||||||
{
|
{
|
||||||
Et2UrlEmail.action(email);
|
Et2UrlEmail.action(email);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user