?> <?php echo $form->field($model, 'upid')->widget(\kartik\widgets\Select2::className(), ['data' => \yii\helpers\ArrayHelper::map(\backend\models\Helpdoc::findAll(['status' => 1]), 'id', 'title'), 'options' => ['placeholder' => '请选择上级标题'], 'pluginOptions' => ['allowClear' => true, 'tags' => true, 'tokenSeparators' => [',', ' '], 'maximumInputLength' => 50]]); ?> <?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'tagNames')->widget(\dosamigos\selectize\SelectizeTextInput::className(), ['loadUrl' => ['tag/list'], 'options' => ['class' => 'form-control'], 'clientOptions' => ['plugins' => ['remove_button'], 'valueField' => 'name', 'labelField' => 'name', 'searchField' => ['name'], 'create' => true]])->hint('提示:用逗号或者回车键分隔标签'); ?> <?php echo $form->field($model, 'content')->widget(\kucha\ueditor\UEditor::className(), ['clientOptions' => ['initialFrameHeight' => '200', 'lang' => 'zh-cn', 'toolbars' => [['fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|']]]]); ?> <?php echo $form->field($model, 'status')->dropDownList(\yii\helpers\ArrayHelper::map(\common\models\Preferences::findAll(['classmark' => 'sStatus', 'status' => 1]), 'codes', 'name1')); ?> <?php if (!Yii::$app->request->isAjax) { ?> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? '新增' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?>
/* @var $model app\Models\Article */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="article-form"> <?php $form = ActiveForm::begin(); ?> <?php echo $form->field($model, 'title')->textInput(['maxlength' => true]); ?> <?php echo $form->field($model, 'content')->widget(UEditor::className()); ?> <?php echo $form->field($model, 'tags')->textarea(['rows' => 6]); ?> <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(); ?>
echo $form->field($model, 'title', ['options' => ['class' => 'form-group col-lg-7 paddingLeft']])->textInput()->label('文章名称'); ?> <?php echo $form->field($model, 'isTop', ['options' => ['class' => 'form-group col-lg-5 paddingLeft']])->checkbox(['template' => "<div class=\"test\">{label}{input}{error}</div>"])->label('是否置顶'); ?> <?php echo $form->field($model, 'isIndexShow', ['options' => ['class' => 'form-group col-lg-7 paddingLeft']])->dropDownList(GlobalArray::$articleIsIndexShowArr, ['prompt' => '请选择是否首页展示'])->label('是否首页展示'); ?> <?php echo $form->field($model, 'description', ['options' => ['class' => 'form-group col-lg-7 paddingLeft']])->textarea()->label('文章描述'); ?> <?php echo $form->field($model, 'pic', ['options' => ['class' => 'form-group col-lg-7 paddingLeft']])->label('文章主题图')->widget('common\\widgets\\file_upload\\FileUpload', ['config' => []]); ?> <?php echo $form->field($model, 'content', ['options' => ['class' => 'form-group col-lg-12 paddingLeft']])->label('文章内容')->widget(UEditor::className(), ['clientOptions' => ['initialFrameHeight' => '250', 'lang' => 'zh-cn', 'toolbars' => [['fullscreen', 'source', '|', 'undo', 'redo', '|', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', 'directionalityltr', 'directionalityrtl', 'indent', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', 'simpleupload', 'emotion', 'scrawl', 'attachment', 'map', 'gmap', 'insertframe', 'pagebreak', 'background', '|', 'horizontal', 'date', 'time', 'spechars', 'snapscreen', '|', 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', '|', 'print', 'preview']]]]); ?> <?php echo $form->errorSummary($model, ['header' => false, 'class' => 'col-lg-12']); ?> <div class="form-group col-lg-12"> <?php echo Html::submitButton('确定', ['class' => 'btn btn-primary', 'name' => 'add-activity-button', 'error' => 'ss']); ?> <a class="btn-cancel" href="<?php echo \common\widgets\Variable::$activityList_url; ?> ">返回</a> </div> <?php ActiveForm::end();
echo $form->field($model, 'isShow', ['options' => ['class' => 'form-group col-lg-6 paddingLeft']])->dropDownList(GlobalArray::$activityIsShowArray, ['prompt' => '请选择活动展示介质'])->label('活动展示'); ?> <?php echo $form->field($model, 'discount', ['options' => ['class' => 'col-lg-6 paddingLeft']])->textInput(['placeholder' => '没有可不填'])->label('活动优惠折扣'); ?> <?php echo $form->field($model, 'reduceMoney', ['options' => ['class' => 'col-lg-6 paddingLeft']])->textInput(['placeholder' => '没有可不填'])->label('活动优惠金额'); ?> <?php echo $form->field($model, 'wapUrl')->textInput(['placeholder' => '没有可不填'])->label('移动端活动链接'); ?> <?php echo $form->field($model, 'pcUrl')->textInput(['placeholder' => '没有可不填'])->label('PC端活动链接'); ?> <?php echo $form->field($model, 'rule')->label('活动规则')->widget(UEditor::className(), ['clientOptions' => ['initialFrameHeight' => '250', 'lang' => 'zh-cn', 'toolbars' => [['source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'autotypeset', 'justify', '|', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'simpleupload', '|']]]]); ?> <?php echo $form->errorSummary($model, ['header' => false]); ?> <div class="form-group"> <?php echo Html::submitButton('确定', ['class' => 'btn btn-primary', 'name' => 'add-activity-button', 'error' => 'ss']); ?> <?php echo Html::resetButton('重置', ['class' => 'btn btn-primary', 'name' => 'reset-button', 'error' => 'ss']); ?> <a class="btn-cancel" href="<?php echo \common\widgets\Variable::$activityList_url; ?> ">返回</a>
* 版权所有 2001-2016 http://www.zhmax.com * ---------------------------------------------- * 这不是一个自由软件,未经授权不许任何使用和传播。 * ---------------------------------------------- * @date: 16-5-23 上午10:16 * @author: LocoRoco<*****@*****.**> * @version:v2016 * @since:Yii2 * ---------------------------------------------- * 程序文件简介: * ============================================== */ use yii\helpers\Html; use yii\helpers\Url; use yii\widgets\ActiveForm; $form = ActiveForm::begin(['enableAjaxValidation' => true, 'options' => ['class' => 'model-form']]); echo $form->field($model, 'title'); echo $form->field($model, 'text')->widget(\kucha\ueditor\UEditor::className(), ['clientOptions' => ['initialFrameHeight' => '400', 'lang' => 'zh-cn']]); ?> <?php if (IS_ROOT) { ?> <?php echo $form->field($model, 'slug'); } ?> <?php echo Html::submitButton(Yii::t('easyii', 'Save'), ['class' => 'btn btn-primary']); ActiveForm::end();
?> </div> <div class="adminCon-right"> <?php echo Tool::setBreadcrumbs([['鲜橙生活', \common\widgets\Variable::$liftObject_url], [$this->title]]); ?> <div class="" id="seller-fixed"> <div class="dis-con"> <?php $form = ActiveForm::begin(['id' => 'add-activity-form', 'action' => Yii::$app->urlManager->createUrl([Variable::$editLiftObject_url, 'id' => $articleModel->id]), 'method' => 'post', 'options' => ['enctype' => 'multipart/form-data']]); ?> <?php echo $form->field($model, 'title', ['options' => ['class' => 'form-group col-lg-7 paddingLeft']])->textInput(['disabled' => true])->label('项目名称'); ?> <?php echo $form->field($model, 'content', ['options' => ['class' => 'form-group col-lg-12 paddingLeft']])->label('内容')->widget(UEditor::className(), ['clientOptions' => ['initialFrameHeight' => '450', 'lang' => 'zh-cn', 'toolbars' => [['imagePopup', 'imageScaleEnabled', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', 'autotypeset', 'justify', '|', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', '|', 'lineheight', '|', 'indent', '|']]]]); ?> <?php echo $form->errorSummary($model, ['header' => false, 'class' => 'col-lg-12']); ?> <div class="form-group col-lg-12"> <?php echo Html::submitButton('确定', ['class' => 'btn btn-primary', 'name' => 'add-activity-button', 'error' => 'ss']); ?> <a class="btn-cancel" href="<?php echo Variable::$liftObject_url; ?> ">返回</a> </div> <?php ActiveForm::end();