Преглед на файлове

Merge tag 'hotfix_1412' into develop

hotfix_1412
feature/souke
Guillaume Bourgeois преди 1 година
родител
ревизия
f26f372c6c
променени са 2 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. +5
    -0
      producer/controllers/SiteController.php
  2. +2
    -0
      producer/views/layouts/main.php

+ 5
- 0
producer/controllers/SiteController.php Целия файл

@@ -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 Целия файл

@@ -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…
Отказ
Запис