Browse Source

Merge branch 'hotfix/hotfix_1412'

master
Guillaume Bourgeois 11 months ago
parent
commit
50450e22b0
2 changed files with 7 additions and 0 deletions
  1. +5
    -0
      producer/controllers/SiteController.php
  2. +2
    -0
      producer/views/layouts/main.php

+ 5
- 0
producer/controllers/SiteController.php View File

@@ -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)) {

+ 2
- 0
producer/views/layouts/main.php View File

@@ -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
],
],
]);

Loading…
Cancel
Save