diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 5a5ef5fa90c..cdfd3e526cd 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -224,6 +224,8 @@ if ($object->fetch($id) >= 0) dol_fiche_end(); + print '
'; + $allowaddtarget=($object->statut == 0); diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 01b53487821..c5e8e68901b 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -116,12 +116,13 @@ if ($action == 'presend') } $formmail->withfrom = 1; + // Fill list of recipient with email inside <>. $liste = array(); if ($object->element == 'expensereport') { $fuser = new User($db); $fuser->fetch($object->fk_user_author); - $liste['thirdparty'] = $fuser->getFullName($langs)." <".$fuser->email.">"; + $liste['thirdparty'] = $fuser->getFullName($langs)." <".$fuser->email.">"; } elseif ($object->element == 'societe') { @@ -131,7 +132,7 @@ if ($action == 'presend') } elseif ($object->element == 'user' || $object->element == 'member') { - $liste['thirdparty'] = $object->getFullName($langs)." <".$object->email.">"; + $liste['thirdparty'] = $object->getFullName($langs)." <".$object->email.">"; } else { diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 042e748ad36..aa33fcf575b 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2087,7 +2087,7 @@ class Societe extends CommonObject if ($this->email && $addthirdparty) { if (empty($this->name)) $this->name=$this->nom; - $contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">"; + $contact_emails['thirdparty']=$langs->transnoentitiesnoconv("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">"; } //var_dump($contact_emails) return $contact_emails; @@ -2108,7 +2108,7 @@ class Societe extends CommonObject { if (empty($this->name)) $this->name=$this->nom; // TODO: Tester si tel non deja present dans tableau contact - $contact_phone['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->phone.">"; + $contact_phone['thirdparty']=$langs->transnoentitiesnoconv("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->phone.">"; } return $contact_phone; } @@ -2118,7 +2118,7 @@ class Societe extends CommonObject * * @param string $mode 'email' or 'mobile' * @param int $hidedisabled 1=Hide contact if disabled - * @return array Array of contacts emails or mobile array(id=>'Name ') + * @return array Array of contacts emails or mobile. Example: array(id=>'Name ') */ function contact_property_array($mode='email', $hidedisabled=0) { @@ -2140,7 +2140,8 @@ class Societe extends CommonObject $sepa="("; $sepb=")"; if ($mode == 'email') { - $sepa="<"; $sepb=">"; + //$sepa="<"; $sepb=">"; + $sepa="<"; $sepb=">"; } $i = 0; while ($i < $nump) @@ -2155,8 +2156,8 @@ class Societe extends CommonObject { if (empty($property)) { - if ($mode == 'email') $property=$langs->trans("NoEMail"); - else if ($mode == 'mobile') $property=$langs->trans("NoMobilePhone"); + if ($mode == 'email') $property=$langs->transnoentitiesnoconv("NoEMail"); + else if ($mode == 'mobile') $property=$langs->transnoentitiesnoconv("NoMobilePhone"); } if (!empty($obj->poste))