Blame view

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