Commit f66afe25 by 宁成龙

完善提示

parent 333aa830
...@@ -29,7 +29,7 @@ class UserEditAction extends AbstractTool ...@@ -29,7 +29,7 @@ class UserEditAction extends AbstractTool
public function render() public function render()
{ {
$form = EditUserHandle::make(['key'=>$this->getKey()]); $form = EditUserHandle::make(['key'=>$this->getKey()]);
$buttonName = trans('user.labels.handle'); $buttonName = admin_trans('edit');
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 style="margin-right: 5px" class="btn btn-sm 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">' . <i class="feather icon-check-circle"></i> <span class="d-none d-sm-inline" style="margin-left: 5px">' .
......
...@@ -21,7 +21,7 @@ class UserDetail extends \Dcat\Admin\Support\LazyRenderable ...@@ -21,7 +21,7 @@ class UserDetail extends \Dcat\Admin\Support\LazyRenderable
return Show::make($id, new User(), function (Show $show) { return Show::make($id, new User(), function (Show $show) {
$show->panel() $show->panel()
->tools(function (Show\Tools $tools) { ->tools(function (Show\Tools $tools) {
$userEditAction = new UserEditAction("用户编辑"); $userEditAction = new UserEditAction(admin_trans("edit"));
$userEditAction->setKey($this->key); $userEditAction->setKey($this->key);
$tools->disableDelete(); $tools->disableDelete();
$tools->disableEdit(); $tools->disableEdit();
......
...@@ -133,7 +133,7 @@ class UserService ...@@ -133,7 +133,7 @@ class UserService
"status" => User::STATUS_NORMAL, "status" => User::STATUS_NORMAL,
"sale_id" => request()->user->userId ?? "1000", "sale_id" => request()->user->userId ?? "1000",
"sale_name" => request()->user->name ?? "admin", "sale_name" => request()->user->name ?? "admin",
"create_time" => time(), "create_time" => time(),
"update_time" => time(), "update_time" => time(),
]; ];
$userId = User::insertData($userData); $userId = User::insertData($userData);
...@@ -151,6 +151,7 @@ class UserService ...@@ -151,6 +151,7 @@ class UserService
'phone' => 'required', 'phone' => 'required',
'country' => 'required', 'country' => 'required',
'city' => 'required', 'city' => 'required',
'address_type' => 'required',
'post_code' => 'required', 'post_code' => 'required',
'detail_address' => 'required', 'detail_address' => 'required',
'is_default' => 'required', 'is_default' => 'required',
......
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