?> " /> </td> </tr> <tr class='ht'> <td>담당구역</td> <td><input type="text" class=ed name=mb_area value="<?php echo $mb['mb_area']; ?> " /> </td> <td>가입project</td> <td> <?php $data = array('hlzone', 'mcard', 'intro', 'root'); echo get_type_select($data, 'mb_project', 'mb_project', $mb['mb_project']); ?> <!--<input type="text" class=ed name=mb_project value="<?php echo $mb['mb_project']; ?> " />--> </td> </tr> <tr><td colspan=4 class=line2></td></tr> </table> <p align=center> <input type=submit class=btn1 accesskey='s' value=' 확 인 '>
/** * @param $form * @param $data * @return mixed */ public function buildBaseForm($form, $data, $entity = 2) { /*日志 log 字段*/ $form->add('hidden', 'goods_id', $data['id']); /*名称 title 字段*/ $form->add('label', 'label_title', 'title', '名称', null); $obj = $form->add('text', 'title', op_t($data['title'])); $obj->set_rule(array('required' => array('error', '名称必须填写。'), 'length' => array(2, 20, 'error', '长度必须在2-20个字之间。'))); $form->add('note', 'note_title', 'title', '必填,最短2个字,最长20个字。', array('style' => 'width:200px')); /*英文名称 etitle 字段*/ $form->add('label', 'label_etitle', 'etitle', '英文名称', null); $obj = $form->add('text', 'etitle', $data['etitle']); $obj->set_rule(array('required' => array('error', '名称必须填写。'), 'length' => array(1, 20, 'error', '长度必须在1-20个字之间。'))); $form->add('note', 'note_etitle', 'etitle', '必填,最短1个字,最长20个字。尽量不要与其他模块重名。', array('style' => 'width:400px')); /*作者 author 字段*/ $form->add('label', 'label_author', 'author', '作者', null); $obj = $form->add('text', 'author', $data['author']); $obj->set_rule(array('length' => array(2, 20, 'error', '长度必须在2-20个字之间。'))); $form->add('note', 'note_author', 'author', '填写该插件的作者名称,如果不填则为当前登录ID。', array('style' => 'width:300px')); /*分类 type_id 字段*/ $options = get_type_select($entity); $form->add('label', 'label_type', 'type_id', '分类'); $obj = $form->add('select', 'type_id', $data['type_id']); $obj->add_options($options, true); $obj->set_rule(array('required' => array('error', '请务必选择分类。'))); /*图标cover 字段*/ $form->add('label', 'label_cover', 'cover', '图标'); $obj = $form->add('wuploadpicture', 'cover', $data['cover'], array('width' => 80, 'height' => 80)); // set rules $obj->set_rule(array('filetype' => array('jpg,png,gif', 'error', '图标必须为 jpg, png or gif !'), 'filesize' => array(1024000, 'error', '图标不能超过 1MB!'))); $form->add('note', 'note_cover', 'cover', '建议尺寸 80 * 80 ', array('style' => 'width:200px')); /*兼容版本 compat 字段*/ $form->add('label', 'label_extra', 'compat', '兼容版本'); if ($data) { $obj = $form->add('checkboxes', 'compat[]', get_all_compat_version(), decode_compat_to_array_from_db($data['compat'])); } else { $obj = $form->add('checkboxes', 'compat[]', get_all_compat_version(), array('5', '4', '3')); } $obj->set_rule(array('required' => array('error', '至少兼容一种版本。'))); return $obj; }