mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-16 14:22:48 +00:00
添加分类刷新
This commit is contained in:
parent
4ab5cac3ff
commit
41455d617d
@ -46,7 +46,7 @@ class StoreCategory extends AuthController
|
|||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$form = Form::create(Url::build('save'),[
|
$field = [
|
||||||
Form::select('pid','父级')->setOptions(function(){
|
Form::select('pid','父级')->setOptions(function(){
|
||||||
$list = CategoryModel::getTierList();
|
$list = CategoryModel::getTierList();
|
||||||
$menus = [['value'=>0,'label'=>'顶级菜单']];
|
$menus = [['value'=>0,'label'=>'顶级菜单']];
|
||||||
@ -59,9 +59,8 @@ class StoreCategory extends AuthController
|
|||||||
Form::frameImageOne('pic','分类图标',Url::build('admin/widget.images/index',array('fodder'=>'pic')))->icon('image'),
|
Form::frameImageOne('pic','分类图标',Url::build('admin/widget.images/index',array('fodder'=>'pic')))->icon('image'),
|
||||||
Form::number('sort','排序'),
|
Form::number('sort','排序'),
|
||||||
Form::radio('is_show','状态',1)->options([['label'=>'显示','value'=>1],['label'=>'隐藏','value'=>0]])
|
Form::radio('is_show','状态',1)->options([['label'=>'显示','value'=>1],['label'=>'隐藏','value'=>0]])
|
||||||
]);
|
];
|
||||||
$form->setMethod('post')->setTitle('添加产品')->setSuccessScript('parent.$(".J_iframe:visible")[0].contentWindow.location.reload();');
|
$form = Form::make_post_form('添加产品',$field,Url::build('save'));
|
||||||
|
|
||||||
$this->assign(compact('form'));
|
$this->assign(compact('form'));
|
||||||
return $this->fetch('public/form-builder');
|
return $this->fetch('public/form-builder');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class FormBuilder extends Form
|
|||||||
* @param $jscallback null 不执行 1 父级刷新 2 父级刷新关闭弹框 str 自定义
|
* @param $jscallback null 不执行 1 父级刷新 2 父级刷新关闭弹框 str 自定义
|
||||||
* @return $this
|
* @return $this
|
||||||
*/
|
*/
|
||||||
public static function make_post_form($title,array $field,$url,$jscallback = null){
|
public static function make_post_form($title,array $field,$url,$jscallback = 1){
|
||||||
$form = Form::create($url);//提交地址
|
$form = Form::create($url);//提交地址
|
||||||
$form->setMethod('POST');//提交方式
|
$form->setMethod('POST');//提交方式
|
||||||
$form->components($field);//表单字段
|
$form->components($field);//表单字段
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user