示例#1
0
文件: _form.php 项目: omeke/yii2-papa
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'short_text')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300, 'imageGetJson' => Url::to(['/blogs/default/imperavi-get']), 'imageUpload' => Url::to(['/blogs/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/blogs/default/imperavi-file-upload'])]]);
?>

    <?php 
echo $form->field($model, 'text')->widget(Imperavi::className(), ['settings' => ['minHeight' => 300, 'imageGetJson' => Url::to(['/blogs/default/imperavi-get']), 'imageUpload' => Url::to(['/blogs/default/imperavi-image-upload']), 'fileUpload' => Url::to(['/blogs/default/imperavi-file-upload'])]]);
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(Blog::statusNames());
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

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

</div>