<div class="col-md-12 col-lg-4">
                <?php 
echo $form->field($model, 'pid')->dropDownList($category_array);
?>
            </div>
            <div class="col-md-12 col-lg-4">
                <?php 
echo $form->field($model, 'display')->dropDownList(Category::getAvailableDisplay());
?>
            </div>
        </div>
        <?php 
echo $form->field($model, 'keywords')->textInput(['maxlength' => 255]);
?>

        <?php 
echo $form->field($model, 'desc')->textarea(['rows' => 6])->widget(UEditor::className(), ['config' => ['toolbars' => [['source', 'link', 'bold', 'italic', 'underline', 'forecolor', 'superscript', 'insertimage', 'spechars', 'blockquote']], 'initialFrameHeight' => '150']]);
?>
    </div>
    <div class="box-footer form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? '创建' : '保存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        <?php 
echo Html::a('返回', Yii::$app->request->referrer, ['class' => 'btn btn-default']);
?>
    </div>
    <?php 
ActiveForm::end();
?>
</div>
            <?php 
echo $form->field($model, 'type')->dropDownList(Post::getAvailableType());
?>
        </div>
        <div class="col-md-12 col-lg-3">
            <?php 
echo $form->field($model, 'is_top')->dropDownList(['0' => '普通', '1' => '置顶']);
?>
        </div>
    </div>
    <?php 
echo $form->field($model, 'content')->textarea(['rows' => 6])->widget(UEditor::className(), ['config' => ['serverUrl' => ['editor/index'], 'iframeCssUrl' => Yii::getAlias('@web') . '/static/css/ueditor.css']]);
?>

    <?php 
echo $form->field($model, 'excerpt')->textarea(['rows' => 6])->widget(UEditor::className(), ['config' => ['toolbars' => [['source', 'link', 'bold', 'italic', 'underline', 'forecolor', 'superscript', 'insertimage', 'spechars', 'blockquote', 'removeformat', 'pasteplain']], 'initialFrameHeight' => '150', 'serverUrl' => ['editor/index'], 'iframeCssUrl' => Yii::getAlias('@web') . '/static/css/ueditor.css']]);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton('保存', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        <?php 
echo Html::a('返回', ['post/index'], ['class' => 'btn btn-default']);
?>
    </div>

    <?php 
ActiveForm::end();
?>