Commit 96cc3845 by 宁成龙

完善编辑客户页面

parent 30085249
...@@ -18,7 +18,7 @@ use Dcat\Admin\Grid\RowAction; ...@@ -18,7 +18,7 @@ use Dcat\Admin\Grid\RowAction;
class UserEditAction extends AbstractTool class UserEditAction extends AbstractTool
{ {
protected $action; protected $action;
protected $htmlClasses = ['btn btn-primary btn-sm btn-mini']; protected $htmlClasses = ['btn btn-sm btn-primary'];
// 注意action的构造方法参数一定要给默认值 // 注意action的构造方法参数一定要给默认值
public function __construct($title = null, $action = 1) public function __construct($title = null, $action = 1)
{ {
...@@ -37,8 +37,9 @@ class UserEditAction extends AbstractTool ...@@ -37,8 +37,9 @@ class UserEditAction extends AbstractTool
$form = EditUserHandle::make(['key'=>$this->getKey()]); $form = EditUserHandle::make(['key'=>$this->getKey()]);
$buttonName = trans('user.labels.handle'); $buttonName = trans('user.labels.handle');
return Modal::make()->lg()->title($this->title)->body($form->payload(['key'=>$this->getKey()]))->onLoad return Modal::make()->lg()->title($this->title)->body($form->payload(['key'=>$this->getKey()]))->onLoad
($this->getModalScript())->button('<button class="btn btn-primary"> ($this->getModalScript())->button('<button style="margin-right: 5px" class="btn btn-sm btn-primary">
<i class="feather icon-check-circle"></i><span class="d-none d-sm-inline" style="margin-left: 5px">' . $buttonName . '</span> <i class="feather icon-check-circle"></i> <span class="d-none d-sm-inline" style="margin-left: 5px">' .
$buttonName . '</span>
</button>'); </button>');
} }
......
...@@ -130,27 +130,7 @@ class UserController extends AdminController ...@@ -130,27 +130,7 @@ class UserController extends AdminController
*/ */
protected function form() protected function form()
{ {
return Form::make(new User(), function (Form $form) { return Form::dialog("测试");
$form->display('id'); // return $form;
$form->text('user_sn');
$form->text('name');
$form->text('email');
$form->text('email_verified_at');
$form->text('password');
$form->text('phone');
$form->text('remember_token');
$form->text('account_properties');
$form->text('status');
$form->text('company_name');
$form->text('first_name');
$form->text('sale_id');
$form->text('sale_name');
$form->text('last_name');
$form->text('created_time');
$form->text('update_time');
$form->display('created_at');
$form->display('updated_at');
});
} }
} }
...@@ -23,9 +23,8 @@ class UserDetail extends \Dcat\Admin\Support\LazyRenderable ...@@ -23,9 +23,8 @@ class UserDetail extends \Dcat\Admin\Support\LazyRenderable
->tools(function (Show\Tools $tools) { ->tools(function (Show\Tools $tools) {
$userEditAction = new UserEditAction("用户编辑"); $userEditAction = new UserEditAction("用户编辑");
$userEditAction->setKey($this->key); $userEditAction->setKey($this->key);
$tools->disableEdit();
$tools->disableList();
$tools->disableDelete(); $tools->disableDelete();
$tools->disableEdit();
$tools->append($userEditAction); $tools->append($userEditAction);
}); });
$show->row(function (Show\Row $show) { $show->row(function (Show\Row $show) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment