Skip to content
Snippets Groups Projects
Commit b8f73696 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Utilisation d'un message personnalisable pour l'envoi du contrat par mail (data/parametres.php).

parent b79b99bd
No related branches found
No related tags found
1 merge request!50Ll contrat
...@@ -343,12 +343,15 @@ class ContratController extends AbstractController ...@@ -343,12 +343,15 @@ class ContratController extends AbstractController
} }
if (!empty($contrat->getIntervenant()->getEmail())) { if (!empty($contrat->getIntervenant()->getEmail())) {
$html = $this->renderer->render('application/contrat/mail/contrat', [ //Utilisation ici du parametre email
'contrat' => $contrat, $html = $this->getServiceParametres()->get('contrat_modele_mail');
]); //Personnalisation des variables
$vIntervenant = $contrat->getIntervenant()->getCivilite()->getLibelleCourt() . " ". $contrat->getIntervenant()->getNomUsuel();
$vUtilisateur = $this->getServiceContext()->getUtilisateur()->getDisplayName();
$html = str_replace([':intervenant', ':utilisateur'], [$vIntervenant, $vUtilisateur], $html);
$message = $this->getServiceModeleContrat()->prepareMail($contrat, $html); $message = $this->getServiceModeleContrat()->prepareMail($contrat, $html);
$mail = $this->mail()->send($message); $mail = $this->mail()->send($message);
$here="";
} }
return $this->getResponse(); return $this->getResponse();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment