Ejemplo n.º 1
0
echo $form->field($model, 'classify')->textInput()->dropDownList($model->musicClassify());
?>

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

    <?php 
//  echo $form->field($model, 'content')->widget(
//     MarkdownEditor::classname(),
//     ['height' => 300, 'encodeLabels' => false]
// );
?>

    <?php 
echo $form->field($model, 'content')->widget(Ueditor::classname(), ['style' => 'width:100%;height:400px', 'renderTag' => true, 'jsOptions' => ['serverUrl' => yii\helpers\Url::to(['upload']), 'autoHeightEnable' => true, 'autoFloatEnable' => true]]);
?>


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

    <?php 
echo $form->field($model, 'status')->textInput()->dropDownList($model->getList());
?>

    <?php 
echo $form->field($model, 'tags')->textInput();
?>
    <div class="hint-block">特别注意:多个标签请用 <font color="red"><strong>半角逗号</strong></font> 分隔。</div>
Ejemplo n.º 2
0
    <?php 
echo $form->field($model, 'status')->dropDownList(\backend\models\Article::getArrayStatus());
?>
    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'intro')->textarea(['rows' => 6]);
?>



    <?php 
//外部TAG
echo Html::tag('script', $model->content, ['id' => Html::getInputId($model, 'content'), 'name' => Html::getInputName($model, 'content'), 'type' => 'text/plain']);
echo Ueditor::widget(['model' => $model, 'attribute' => 'content', 'renderTag' => false, 'jsOptions' => ['serverUrl' => yii\helpers\Url::to(['upload']), 'autoHeightEnable' => true, 'autoFloatEnable' => true]]);
?>

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

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

</div>
Ejemplo n.º 3
0
            
                <?php 
echo $form->field($model, 'score')->textInput();
?>
            
                <?php 
echo $form->field($model, 'status')->dropDownList(Product::getStatusLabels());
?>
            
                <?php 
echo $form->field($model, 'display_order')->textInput();
?>
            </div>
            <div class="tab-pane" id="description">
                <?php 
echo $form->field($model, 'description')->widget(Ueditor::className(), ['style' => 'width:100%;height:400px', 'renderTag' => true, 'readyEvent' => 'console.log("example2 ready")', 'jsOptions' => ['serverUrl' => Url::to(['ueditor-upload']), 'autoHeightEnable' => true, 'autoFloatEnable' => true]]);
?>
            </div>
            <div class="tab-pane" id="picture">
                <style type='text/css'>
                    .upload-kit .upload-kit-item {
                        height: 50px;
                        border: none;
                        border-radius: 0;
                    }
                    
                    .upload-kit .upload-kit-item.image > img {
                        border-radius: 0;
                    }