Blame view

backend/views/comment/_form.php 848 Bytes
4253cbec   root   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
  <?php
      
      use common\modules\comment\models\Comment;
      use yii\helpers\Html;
      use yii\widgets\ActiveForm;
      
      /* @var $this yii\web\View */
      /* @var $model Comment */
      /* @var $form yii\widgets\ActiveForm */
      $status_list = [
          Comment::STATUS_ACTIVE  => 'Активный',
          Comment::STATUS_HIDDEN  => 'Новый',
          Comment::STATUS_DELETED => 'Удаленный',
      ]
  ?>
  
  <div class="comment-form">
      
      <?php $form = ActiveForm::begin(); ?>
      
      <?= $form->field($model, 'text')
               ->textarea([ 'rows' => 6 ]) ?>
      
      <?= $form->field($model, 'status')
               ->dropDownList($status_list) ?>
      
      <div class="form-group">
          <?= Html::submitButton('Обновить', [ 'class' => 'btn btn-primary' ]) ?>
      </div>
      
      <?php ActiveForm::end(); ?>
  
  </div>