Blame view

common/modules/comment/views/comment_form.php 1.02 KB
3f2bc3d0   Administrator   first commit
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
28
29
30
31
32
33
34
35
36
37
38
  <?php

      /**

       * @var \common\modules\comment\models\Comment $model

       */

      use yii\widgets\ActiveForm;

  

      $form = ActiveForm::begin();

  

  ?>

  <?php

      echo $form->field($model, 'comment_id')

                ->label(false)

                ->hiddenInput();

      if(!empty( $model->parent )) {

          ?>

          <div class="artbox_comment_update_reply">

              <?php

                  echo "<span>";

                  if(!empty( $model->parent->author )) {

                      echo $model->parent->author->firstname . ' ' . $model->parent->author->lastname;

                  } else {

                      echo $model->parent->user_name;

                  }

                  echo "</span>";

                  echo $form->field($model, 'comment_pid')

                            ->label(false)

                            ->hiddenInput();

              ?>

          </div>

          <?php

      }

      echo $form->field($model, 'text')

                ->label(false)

                ->textarea();

  ?>

  <?php

      $form->end();

  ?>