Blame view

views/manage/answer.php 1.77 KB
ce440bf9   Alexey Boroda   -Comments upgrade...
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
  <?php
      use artweb\artbox\comment\models\CommentModel;
      use yii\helpers\Html;
      use yii\web\View;
      use yii\widgets\ActiveForm;
      
      /**
       * @var View         $this
       * @var CommentModel $model
       * @var CommentModel $answer
       */
      
      $this->title = 'Ответить на комментарий# ' . $model->artbox_comment_id;
      
      $this->params[ 'breadcrumbs' ][] = [
          'label' => 'Комментарии',
          'url'   => [ 'index' ],
      ];
      $this->params[ 'breadcrumbs' ][] = $this->title;
  
  ?>
  
  <div class="comment-answer">
      
      <?php $form = ActiveForm::begin(); ?>
    <div class="form-group">
        <?= $form->field($answer, 'text')
                 ->textarea() ?>
        
        <?= $form->field($answer, 'artbox_comment_pid')
                 ->hiddenInput(
                     [
                         'value' => $model->artbox_comment_id,
                     ]
                 )
                 ->label(false) ?>
        
        <?= $form->field($answer, 'user_id')
                 ->hiddenInput(
                     [
                         'value' => 1,
                     ]
                 )
                 ->label(false) ?>
        
        <?= $form->field($answer, 'entity')
                 ->hiddenInput(
                     [
                         'value' => $model->entity,
                     ]
                 )
                 ->label(false) ?>
        
        <?= $form->field($answer, 'entity_id')
                 ->hiddenInput(
                     [
                         'value' => $model->entity_id,
                     ]
                 )
                 ->label(false) ?>
        
        <?= Html::submitButton(
            \Yii::t('app', 'Ответить'),
            [ 'class' => 'btn btn-primary' ]
        ) ?>
    </div>
      
      <?php ActiveForm::end(); ?>
  
  </div>