Browse Source

[Producer] Captcha : formulaire de contact #228

refactoring
Guillaume Bourgeois 2 years ago
parent
commit
4a82355300
3 changed files with 7 additions and 15 deletions
  1. +4
    -11
      frontend/views/site/contact.php
  2. +1
    -2
      producer/controllers/SiteController.php
  3. +2
    -2
      producer/views/layouts/main.php

+ 4
- 11
frontend/views/site/contact.php View File

@@ -56,18 +56,11 @@ $this->params['breadcrumbs'][] = $this->title;

<div class="row">
<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>
<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']); ?>
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'email') ?>

+ 1
- 2
producer/controllers/SiteController.php View File

@@ -188,8 +188,6 @@ class SiteController extends ProducerBaseController
*/
public function actionContact()
{
return $this->redirect(['site/index']);

$model = new ContactForm();
$producer = $this->getProducer();

@@ -202,6 +200,7 @@ class SiteController extends ProducerBaseController
$email = $contact->email;
}

$email = 'guillaume@laclic.fr';
if (strlen($email) && $model->sendEmail($email)) {
$isSent = true;
}

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

@@ -209,11 +209,11 @@ if (!Yii::$app->user->isGuest) {
'visible' => !Yii::$app->user->isGuest && $producer->credit,
'active' => $this->getControllerAction() == 'credit/history',
],
/*[
[
'label' => '<span class="glyphicon glyphicon-envelope"></span> Contact',
'url' => Yii::$app->urlManager->createUrl(['site/contact']),
'active' => $this->getControllerAction() == 'site/contact',
],*/
],
[
'label' => '<span class="glyphicon glyphicon-cog"></span> Administration',
'url' => Yii::$app->urlManagerBackend->createAbsoluteUrl(['site/index']),

Loading…
Cancel
Save