Blame view

frontend/views/comments/_form.php 1.4 KB
4d7ee438   Alexey Boroda   Changes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
  <?php
      use common\modules\comment\models\CommentModel;
      use common\modules\comment\models\RatingModel;
      use yii\base\Model;
      use yii\helpers\Html;
      use yii\helpers\Url;
      use yii\web\View;
      use yii\widgets\ActiveForm;
      
      /**
       * @var CommentModel     $comment_model
       * @var array            $form_params
       * @var Model            $model
       * @var string           $formId
       * @var View             $this
       * @var RatingModel|NULL $rating_model
       */
      $form = ActiveForm::begin([
          'id'     => $formId,
          'action' => Url::to([
              'artbox-comment/default/create',
              'entity' => $comment_model->encryptedEntity,
          ]),
      ]);
  ?>
      <div class="form-comm-wr">
          <?php
e388a1a8   Eugeny Galkovskiy   123
28
  
5f3801d4   Eugeny Galkovskiy   123
29
              echo $form->field($comment_model, 'text', [ 'options' => [ 'class' => 'form-group input_bl area_bl', 'placeholder' => 'Комментарий' ] ])
e388a1a8   Eugeny Galkovskiy   123
30
31
              ->textarea();
  
4d7ee438   Alexey Boroda   Changes:
32
33
34
35
              echo $form->field($comment_model, 'username', [ 'options' => [ 'class' => 'form-group input_bl' ] ])
                            ->textInput();
              echo $form->field($comment_model, 'email', [ 'options' => [ 'class' => 'form-group input_bl' ] ])
                            ->textInput();
e388a1a8   Eugeny Galkovskiy   123
36
  
4d7ee438   Alexey Boroda   Changes:
37
38
39
40
41
42
              echo Html::tag('div', Html::submitButton(Yii::t('artbox-comment', 'Submit')), [ 'class' => 'input_bl submit_btn' ]);
          ?>
      </div>
  <?php
      ActiveForm::end();
  ?>