You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2KB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\bootstrap\ActiveForm;
  4. use yii\captcha\Captcha;
  5. /* @var $this yii\web\View */
  6. /* @var $form yii\bootstrap\ActiveForm */
  7. /* @var $model \frontend\models\ContactForm */
  8. $this->title = 'Contact';
  9. $this->params['breadcrumbs'][] = $this->title;
  10. ?>
  11. <div class="site-contact">
  12. <h1><?= Html::encode($this->title) ?></h1>
  13. <div class="row">
  14. <div class="col-lg-5">
  15. <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
  16. <?= $form->field($model, 'name') ?>
  17. <?= $form->field($model, 'email') ?>
  18. <?= $form->field($model, 'subject') ?>
  19. <?= $form->field($model, 'body')->textArea(['rows' => 6]) ?>
  20. <?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
  21. 'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
  22. ]) ?>
  23. <div class="form-group">
  24. <?= Html::submitButton('Envoyer', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
  25. </div>
  26. <?php ActiveForm::end(); ?>
  27. </div>
  28. </div>
  29. </div>