echo $form->field($model, 'content')->textarea(['rows' => 6]); ?> <?php echo $form->field($model, 'created')->textInput(); ?> <?php echo $form->field($model, 'updated')->textInput(); ?> <?php echo $form->field($model, 'article_id')->widget(AutoComplete::className(), ['name' => 'link', 'data' => $data, 'value' => '', 'clientOptions' => ['minChars' => 2], 'options' => ['placeholder' => 'Шукати по заголовку...']]); ?> <?php echo ActiveListWidget::widget(['model' => $model, 'attribute' => 'status', 'items' => $items, 'label' => 'Статус']); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Додати' : 'Оновити', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>
?> <?php if (!$model->isNewRecord) { echo $form->field($model, 'created')->textInput(); } ?> <?php echo ActiveListWidget::widget(['model' => $model, 'attribute' => 'category_id', 'items' => $items['categories'], 'label' => 'Категорія']); ?> <?php echo ActiveListWidget::widget(['model' => $model, 'attribute' => 'status', 'items' => $items['article_status'], 'label' => 'Статус']); ?> <?php echo ActiveListWidget::widget(['model' => $model, 'attribute' => 'comments_status', 'items' => $items['comments_status'], 'label' => 'Коментарі']); ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Додати' : 'Оновити', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div>