use common\includes\CommonUtility; use yii\web\View; use components\widgets\KindEditor; use components\widgets\Tabs; $formatArray = CommonUtility::getTitleFormat(); $formatValueArray = CommonUtility::getTitleFormatArray($model); ?> <div class="page-form"> <?php $disabled = $model->isNewRecord ? null : 'disabled'; $form = ActiveForm::begin(['fieldConfig' => $this->getDefaultFieldConfig2(), 'options' => ['enctype' => 'multipart/form-data']]); ?> <?php Tabs::begin(['items' => [['label' => '基本信息', 'contentId' => 'tableBasic'], ['label' => '选项', 'contentId' => 'tableOption'], ['label' => 'SEO设置', 'contentId' => 'tableSEO']]]); ?> <div id="tableBasic" class="tab-pane active"> <table class="table"> <?php echo $form->field($model, 'title')->textInput(['maxlength' => 128]); ?> <tr class="form-group field-page-title_format"> <td class="hAlign_right padding_r10"> <label style="font-weight:normal;" for="page-title_format">标题格式</label>:</td> <td> <?php foreach ($formatArray as $value => $label) { $checked = '';
$style = ' selected'; } } $options .= '<option value="' . $row['id'] . '"' . $style . '>' . TStringHelper::blank($row['level']) . $row['name_alias'] . '</option>'; } ?> <div class="channel-form"> <?php $isLeafEnable = $model['is_leaf'] ? 'disabled' : null; $disabled = $model->isNewRecord ? null : 'disabled'; $form = ActiveForm::begin(['fieldConfig' => $this->getDefaultFieldConfig()]); ?> <?php Tabs::begin(['items' => [['label' => '基本信息', 'contentId' => 'tableBasic'], ['label' => '模型\\模板', 'contentId' => 'tableModel'], ['label' => 'SEO设置', 'contentId' => 'tableSEO']]]); ?> <div id="tableBasic" class="tab-pane active"> <table class="table"> <tr class="form-group field-channel-parent_id required"> <td class="hAlign_right padding_r10"><label style="font-weight:normal;" for="channel-parent_id">父级:</label></td> <td> <select id="channel-parent_id" class="form-control" name="Channel[parent_id]"> <?php echo $options; ?> </select> </td> <td> </td>
* @var app\models\DefineTableField $model * @var yii\widgets\ActiveForm $form */ $fieldTypeArray = ['varchar' => '字符型0-255字节(varchar)', 'char' => '定长字符型0-255字节(char)', 'text' => '小型字符型(text)', 'mediumtext' => '中型字符型(mediumtext)', 'longtext' => '大型字符型(longtext)', 'tinyint' => '小数值型(tinyint)', 'smallint' => '中数值型(smallint)', 'int' => '大数值型(int)', 'bigint' => '超大数值型(bigint)', 'float' => '数值浮点型(float)', 'double' => '数值双精度型(double)', 'date' => '日期型(date)', 'datetime' => '日期时间型(datetime)']; $formTypeArray = ['text' => '单行文本框(text)', 'password' => '密码框(password)', 'select' => '下拉框(select)', 'radio' => '单选框(radio)', 'checkbox' => '复选框(checkbox)', 'textarea' => '多行文本框(textarea)', 'file' => '文件(file)', 'editor' => '编辑器(editor)', 'img' => '图片(img)', 'flash' => 'FLASH文件(flash)', 'date' => '日期(date)', 'color' => '颜色(color)', 'morevaluefield' => '多值字段(morevaluefield)', 'linkfield' => '选择外表关联字段(linkfield)', 'linkfieldselect' => '下拉外表关联字段(linkfieldselect)']; ?> <div class="define-table-field-form"> <?php $disabled = $model->isNewRecord ? null : 'disabled'; $form = ActiveForm::begin(['fieldConfig' => $this->getDefaultFieldConfig()]); ?> <?php Tabs::begin(['items' => [['label' => '基本信息', 'contentId' => 'tableBasic'], ['label' => '前台表单', 'contentId' => 'tableFrontForm'], ['label' => '后台表单', 'contentId' => 'tableBackForm']]]); ?> <div id="tableBasic" class="tab-pane active"> <table class="table"> <?php echo $form->field($model, 'field_name')->textInput(['maxlength' => 80, 'disabled' => $disabled]); ?> <?php echo $form->field($model, 'name')->textInput(['maxlength' => 80]); ?> <?php echo $form->field($model, 'type')->dropDownList($fieldTypeArray, ['disabled' => $disabled]);