Loading module/Application/src/Application/Controller/ContratController.php +3 −1 Changes for module/Application/src/Application/Controller/ContratController.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -354,7 +354,9 @@ class ContratController extends AbstractController $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); $subject = $this->getServiceParametres()->get('contrat_modele_mail_objet'); $subject = str_replace(':intervenant', $vIntervenant, $subject); $message = $this->getServiceModeleContrat()->prepareMail($contrat, $html, $subject); $mail = $this->mail()->send($message); } Loading module/Application/src/Application/Form/ParametresForm.php +10 Changes for module/Application/src/Application/Form/ParametresForm.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -314,6 +314,16 @@ class ParametresForm extends AbstractForm ], ]); $this->add([ 'name' => 'contrat_modele_mail_objet', 'type' => 'Text', 'options' => [ 'label' => 'Objet du mail', ], ]); $this->add([ 'name' => 'contrat_modele_mail', 'type' => 'Textarea', Loading module/Application/src/Application/Service/ModeleContratService.php +4 −1 Changes for module/Application/src/Application/Service/ModeleContratService.php: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ class ModeleContratService extends AbstractEntityService public function prepareMail(Contrat $contrat, String $htmlContent) public function prepareMail(Contrat $contrat, String $htmlContent, String $subject = null) { $fileName = sprintf(($contrat->estUnAvenant() ? 'avenant' : 'contrat') . "_%s_%s_%s.pdf", $contrat->getStructure()->getCode(), Loading @@ -122,7 +122,10 @@ class ModeleContratService extends AbstractEntityService $document = $this->generer($contrat, false); $content = $document->saveToData(); if(empty($subject)) { $subject = "Contrat " . $contrat->getIntervenant()->getCivilite() . " " . $contrat->getIntervenant()->getNomUsuel(); } $intervenant = $contrat->getIntervenant(); $dossierIntervenant = $this->getServiceDossier()->getByIntervenant($intervenant); $emailPerso = ($dossierIntervenant) ? $dossierIntervenant->getEmailPerso() : ''; Loading module/Application/view/application/parametre/generaux.phtml +2 Changes for module/Application/view/application/parametre/generaux.phtml: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -84,8 +84,10 @@ <div class="panel-body"> <div class="row"> <div class="col-md-6"> <?= $this->formControlGroup($form->get('contrat_modele_mail_objet')); ?> <?= $this->formControlGroup($form->get('contrat_modele_mail')); ?> </div> <div class="col-md-6"> <?= $this->formControlGroup($form->get('contrat_regle_franchissement')); ?> </div> Loading Loading
module/Application/src/Application/Controller/ContratController.php +3 −1 Changes for module/Application/src/Application/Controller/ContratController.php: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -354,7 +354,9 @@ class ContratController extends AbstractController $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); $subject = $this->getServiceParametres()->get('contrat_modele_mail_objet'); $subject = str_replace(':intervenant', $vIntervenant, $subject); $message = $this->getServiceModeleContrat()->prepareMail($contrat, $html, $subject); $mail = $this->mail()->send($message); } Loading
module/Application/src/Application/Form/ParametresForm.php +10 Changes for module/Application/src/Application/Form/ParametresForm.php: 10 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -314,6 +314,16 @@ class ParametresForm extends AbstractForm ], ]); $this->add([ 'name' => 'contrat_modele_mail_objet', 'type' => 'Text', 'options' => [ 'label' => 'Objet du mail', ], ]); $this->add([ 'name' => 'contrat_modele_mail', 'type' => 'Textarea', Loading
module/Application/src/Application/Service/ModeleContratService.php +4 −1 Changes for module/Application/src/Application/Service/ModeleContratService.php: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -112,7 +112,7 @@ class ModeleContratService extends AbstractEntityService public function prepareMail(Contrat $contrat, String $htmlContent) public function prepareMail(Contrat $contrat, String $htmlContent, String $subject = null) { $fileName = sprintf(($contrat->estUnAvenant() ? 'avenant' : 'contrat') . "_%s_%s_%s.pdf", $contrat->getStructure()->getCode(), Loading @@ -122,7 +122,10 @@ class ModeleContratService extends AbstractEntityService $document = $this->generer($contrat, false); $content = $document->saveToData(); if(empty($subject)) { $subject = "Contrat " . $contrat->getIntervenant()->getCivilite() . " " . $contrat->getIntervenant()->getNomUsuel(); } $intervenant = $contrat->getIntervenant(); $dossierIntervenant = $this->getServiceDossier()->getByIntervenant($intervenant); $emailPerso = ($dossierIntervenant) ? $dossierIntervenant->getEmailPerso() : ''; Loading
module/Application/view/application/parametre/generaux.phtml +2 Changes for module/Application/view/application/parametre/generaux.phtml: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -84,8 +84,10 @@ <div class="panel-body"> <div class="row"> <div class="col-md-6"> <?= $this->formControlGroup($form->get('contrat_modele_mail_objet')); ?> <?= $this->formControlGroup($form->get('contrat_modele_mail')); ?> </div> <div class="col-md-6"> <?= $this->formControlGroup($form->get('contrat_regle_franchissement')); ?> </div> Loading