Commit ba607cb2 by Yvon Kerdoncuff

only try to access contact form type field in presta self init and eval mode…

only try to access contact form type field in presta self init and eval mode otherwise field does not exist
parent b03ad748
......@@ -37,13 +37,15 @@ class ContactController extends AbstractController
$emailFrom = $form['email']->getData();
$message = $form['message']->getData();
$senderTypeAsSubjectSuffix = '';
switch ($form['type']) {
case 'prestataire_candidate':
$senderTypeAsSubjectSuffix = " d'un point de vente candidat";
break;
case 'adherent':
$senderTypeAsSubjectSuffix = " d'un adhérent";
break;
if ($this->getParameter('tav_env') && $this->getParameter('presta_self_init_and_eval')) {
switch ($form['type']) {
case 'prestataire_candidate':
$senderTypeAsSubjectSuffix = " d'un point de vente candidat";
break;
case 'adherent':
$senderTypeAsSubjectSuffix = " d'un adhérent";
break;
}
}
$this->sendMail($name, $emailFrom, $message, $senderTypeAsSubjectSuffix);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment