cfmgrv4 init...4
This commit is contained in:
parent
bcab79a59e
commit
7fb2addcef
@ -51,7 +51,7 @@ class UserController extends AdminController
|
||||
private function init(string $action, array $fields = []): void
|
||||
{
|
||||
$this->action = $action;
|
||||
$this->fields = count($fields) ? $fields : ['id', $this->getModel()::TITLE, 'email', 'mobile', 'role', 'updated_at', 'created_at'];
|
||||
$this->fields = count($fields) ? $fields : ['id', $this->getModel()::TITLE, 'email', 'mobile', 'role', 'status', 'updated_at', 'created_at'];
|
||||
$this->field_rules = $this->getModel()->getFieldRules($action, $this->fields);
|
||||
$this->filter_fields = ['role', 'status'];
|
||||
$this->field_options = $this->getFormFieldOptions($this->filter_fields);
|
||||
@ -71,12 +71,12 @@ class UserController extends AdminController
|
||||
//수정
|
||||
public function modify_form(int $uid): RedirectResponse|string
|
||||
{
|
||||
$this->init('modify', ['passwd', 'confirmpassword', $this->getModel()::TITLE, 'email', 'mobile', 'role']);
|
||||
$this->init('modify', ['passwd', 'confirmpassword', $this->getModel()::TITLE, 'email', 'mobile', 'role', 'status']);
|
||||
return $this->modify_form_procedure($uid);
|
||||
}
|
||||
public function modify(int $uid): RedirectResponse|string
|
||||
{
|
||||
$this->init(__FUNCTION__, ['passwd', 'confirmpassword', $this->getModel()::TITLE, 'email', 'mobile', 'role']);
|
||||
$this->init(__FUNCTION__, ['passwd', 'confirmpassword', $this->getModel()::TITLE, 'email', 'mobile', 'role', 'status']);
|
||||
return $this->modify_procedure($uid);
|
||||
}
|
||||
public function toggle(mixed $uid, string $field): RedirectResponse
|
||||
|
||||
Loading…
Reference in New Issue
Block a user