<div class="row"> | <div class="row"> | ||||
<div class="col-lg-5"> | <div class="col-lg-5"> | ||||
<!--<h2>par téléphone</h2> | |||||
<p id="contact-phone"> | |||||
Guillaume Bourgeois<br /> | |||||
<span class="glyphicon glyphicon-phone"></span> 06 84 59 71 79 | |||||
<br /><br /> | |||||
Fabien Normand<br /> | |||||
<span class="glyphicon glyphicon-phone"></span> 07 81 99 97 01 | |||||
</p>--> | |||||
<h2>Par email</h2> | <h2>Par email</h2> | ||||
<div class="alert alert-info"> | |||||
Ce formulaire de contact vous permet de joindre le développeur de la plateforme Opendistrib. | |||||
Si vous souhaitez joindre un producteur, merci de le faire directement depuis son espace producteur. | |||||
</div> | |||||
<?php $form = ActiveForm::begin(['id' => 'contact-form']); ?> | <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?> | ||||
<?= $form->field($model, 'name') ?> | <?= $form->field($model, 'name') ?> | ||||
<?= $form->field($model, 'email') ?> | <?= $form->field($model, 'email') ?> |
*/ | */ | ||||
public function actionContact() | public function actionContact() | ||||
{ | { | ||||
return $this->redirect(['site/index']); | |||||
$model = new ContactForm(); | $model = new ContactForm(); | ||||
$producer = $this->getProducer(); | $producer = $this->getProducer(); | ||||
$email = $contact->email; | $email = $contact->email; | ||||
} | } | ||||
$email = 'guillaume@laclic.fr'; | |||||
if (strlen($email) && $model->sendEmail($email)) { | if (strlen($email) && $model->sendEmail($email)) { | ||||
$isSent = true; | $isSent = true; | ||||
} | } |
'visible' => !Yii::$app->user->isGuest && $producer->credit, | 'visible' => !Yii::$app->user->isGuest && $producer->credit, | ||||
'active' => $this->getControllerAction() == 'credit/history', | 'active' => $this->getControllerAction() == 'credit/history', | ||||
], | ], | ||||
/*[ | |||||
[ | |||||
'label' => '<span class="glyphicon glyphicon-envelope"></span> Contact', | 'label' => '<span class="glyphicon glyphicon-envelope"></span> Contact', | ||||
'url' => Yii::$app->urlManager->createUrl(['site/contact']), | 'url' => Yii::$app->urlManager->createUrl(['site/contact']), | ||||
'active' => $this->getControllerAction() == 'site/contact', | 'active' => $this->getControllerAction() == 'site/contact', | ||||
],*/ | |||||
], | |||||
[ | [ | ||||
'label' => '<span class="glyphicon glyphicon-cog"></span> Administration', | 'label' => '<span class="glyphicon glyphicon-cog"></span> Administration', | ||||
'url' => Yii::$app->urlManagerBackend->createAbsoluteUrl(['site/index']), | 'url' => Yii::$app->urlManagerBackend->createAbsoluteUrl(['site/index']), |