mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 14:44:32 -04:00
Hide @example.com email address
This commit is contained in:
parent
808e54aa9a
commit
d849a51f1f
@ -332,6 +332,10 @@ class HtmlEngine
|
||||
$data['$country'] = ['value' => isset($this->client->country->name) ? ctrans('texts.country_' . $this->client->country->name) : '', 'label' => ctrans('texts.country')];
|
||||
$data['$country_2'] = ['value' => isset($this->client->country) ? $this->client->country->iso_3166_2 : '', 'label' => ctrans('texts.country')];
|
||||
$data['$email'] = ['value' => isset($this->contact) ? $this->contact->email : 'no contact email on record', 'label' => ctrans('texts.email')];
|
||||
|
||||
if(str_contains($data['$email']['value'], 'example.com'))
|
||||
$data['$email'] = ['value' => '', 'label' => ctrans('texts.email')];
|
||||
|
||||
$data['$client_name'] = ['value' => $this->entity->present()->clientName() ?: ' ', 'label' => ctrans('texts.client_name')];
|
||||
$data['$client.name'] = &$data['$client_name'];
|
||||
$data['$client'] = &$data['$client_name'];
|
||||
@ -382,7 +386,7 @@ class HtmlEngine
|
||||
$data['$contact.full_name'] = ['value' => $this->contact->present()->name(), 'label' => ctrans('texts.name')];
|
||||
$data['$contact'] = &$data['$contact.full_name'];
|
||||
|
||||
$data['$contact.email'] = ['value' => $this->contact->email, 'label' => ctrans('texts.email')];
|
||||
$data['$contact.email'] = &$data['$email'];
|
||||
$data['$contact.phone'] = ['value' => $this->contact->phone, 'label' => ctrans('texts.phone')];
|
||||
|
||||
$data['$contact.name'] = ['value' => isset($this->contact) ? $this->contact->present()->name() : $this->client->present()->name(), 'label' => ctrans('texts.contact_name')];
|
||||
|
Loading…
x
Reference in New Issue
Block a user