/* @var $model app\models\News */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="news-form"> <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($model, 'title')->textInput(['style' => 'width:300px']); ?> <?php echo $form->field($model, 'category_id')->dropDownList(ArrayHelper::map(\app\models\NewsCategory::getAll(), 'id', 'name'), ['style' => 'width:200px']); ?> <?php echo $form->field($model, 'content')->widget(KindEditor::className(), ['clientOptions' => ['allowFileManager' => 'true', 'allowUpload' => 'true']]); ?> <?php echo $form->field($model, 'status')->dropDownList(\app\models\News::$statusList, ['style' => 'width:100px']); ?> <?php if (!$model->isNewRecord && !empty($model->thumb)) { ?> <a href="#"><img src="/upload/images/news/thumb/<?php echo $model->thumb; ?>