Blame view

common/modules/comment/widgets/views/form-comment.php 2 KB
b82db04a   Yarik   test
1
2
  <?php
      /**
2d107e9e   Yarik   test
3
4
5
6
       * @var \common\modules\comment\models\Comment     $model
       * @var \common\models\User                        $user
       * @var \yii\data\ActiveDataProvider               $dataProvider
       * @var null|\common\modules\comment\models\Rating $rating
b82db04a   Yarik   test
7
8
9
10
11
12
13
14
       */
      use yii\widgets\ActiveForm;
      use yii\helpers\Html;
  
  ?>
  <div class="new-portf-comm-count">Комментарии: <?= $dataProvider->totalCount ?></div>
  
  <div class="new-portf-add-comm style">
2d107e9e   Yarik   test
15
  
b82db04a   Yarik   test
16
17
      <?php
          $form = ActiveForm::begin();
b82db04a   Yarik   test
18
  
2d107e9e   Yarik   test
19
20
21
22
23
24
25
26
27
28
          echo $form->field($rating, 'value')
                    ->label(false)
                    ->radioList([
                        1 => 1,
                        2 => 2,
                        3 => 3,
                        4 => 4,
                        5 => 5,
                    ]);
  
b82db04a   Yarik   test
29
30
          if($model->scenario == $model::SCENARIO_GUEST) {
              echo $form->field($model, 'user_name', [
2d107e9e   Yarik   test
31
                  'options'      => [
b82db04a   Yarik   test
32
33
34
35
36
                      'class' => 'input-blocks-comm',
                  ],
                  'inputOptions' => [
                      'class' => 'custom-input-4',
                  ],
2d107e9e   Yarik   test
37
38
              ])
                        ->textInput();
b82db04a   Yarik   test
39
              echo $form->field($model, 'user_email', [
2d107e9e   Yarik   test
40
                  'options'      => [
b82db04a   Yarik   test
41
42
43
44
45
                      'class' => 'input-blocks-comm',
                  ],
                  'inputOptions' => [
                      'class' => 'custom-input-4',
                  ],
2d107e9e   Yarik   test
46
47
              ])
                        ->textInput();
b82db04a   Yarik   test
48
          }
2d107e9e   Yarik   test
49
50
51
52
53
  
      ?>
      <div class="artbox_comment_reply_block"></div>
      <?php
  
b82db04a   Yarik   test
54
          echo $form->field($model, 'text', [
2d107e9e   Yarik   test
55
              'options'      => [
b82db04a   Yarik   test
56
57
58
59
60
                  'class' => 'input-blocks-comm area-comm',
              ],
              'inputOptions' => [
                  'class' => 'custom-area-4',
              ],
2d107e9e   Yarik   test
61
62
          ])
                    ->textarea();
b82db04a   Yarik   test
63
      ?>
2d107e9e   Yarik   test
64
65
66
67
      <div class="input-blocks-comm-button style">
          <?= Html::submitButton('Добавить комментарий') ?>
      </div>
      <?php
b82db04a   Yarik   test
68
69
70
          $form->end();
      ?>
  </div>