@@ -181,6 +181,11 @@ class SiteController extends ProducerBaseController | |||
$model = new ContactForm(); | |||
$producer = $this->getProducerCurrent(); | |||
// @TODO : à gérer avec les feature flag | |||
if($producer->id == 1) { | |||
return $this->redirect(['site/index']); | |||
} | |||
if ($model->load(\Yii::$app->request->post()) && $model->validate()) { | |||
$isSent = false; | |||
if ($producer->contact_email && strlen($producer->contact_email) > 0 && $model->sendEmail($producer)) { |
@@ -178,6 +178,8 @@ if (!Yii::$app->user->isGuest) { | |||
'label' => '<span class="glyphicon glyphicon-envelope"></span> Contact', | |||
'url' => $this->getUrlManagerProducer()->createUrl(['site/contact']), | |||
'active' => $this->getControllerAction() == 'site/contact', | |||
// @TODO : à gérer avec les feature flag | |||
'visible' => $producer->id != 1 | |||
], | |||
], | |||
]); |