Blame view

backend/views/comment/update.php 705 Bytes
2c12aaba   Timur Kastemirov   comments
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  <?php
      use artbox\webcomment\models\CommentModel;
      use yii\helpers\Html;
      use yii\widgets\ActiveForm;
      
      /**
       * @var CommentModel $model
       */
      $statuses = [
          $model::STATUS_ACTIVE  => \Yii::t('artbox-comment', 'Активный'),
          $model::STATUS_HIDDEN  => \Yii::t('artbox-comment', 'Скрытый'),
          $model::STATUS_DELETED => \Yii::t('artbox-comment', 'Удаленный'),
      ];
      $form = ActiveForm::begin();
      echo $form->field($model, 'text')
                ->textarea();
      echo $form->field($model, 'status')
                ->dropDownList($statuses);
      echo Html::submitButton(\Yii::t('artbox-comment', 'Обновить'));
      $form->end();