diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index b12976b..4e91dcc 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -153,7 +153,7 @@ abstract class CommonController extends BaseController $this->setAction($action); $this->setFormFields($this->getService()->getFormFields()); $this->setIndexFields($this->getService()->getIndexFields()); - $this->setViewFields($this->getService()->setViewFields()); + $this->setViewFields($this->getService()->getViewFields()); $this->setFilterFields($this->getService()->getFilterFields()); foreach ($this->getFormFields() as $field) { $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); @@ -287,8 +287,9 @@ abstract class CommonController extends BaseController //입력값정의 $formDatas = []; foreach ($this->getFormFields() as $field) { - $formDatas[] = $this->request->getVar($field); + $formDatas[$field] = $this->request->getVar($field); } + dd($formDatas); $this->entity = $this->create_process($formDatas); $this->getService()->getModel()->transCommit(); return $this->getResultSuccess(); @@ -343,7 +344,7 @@ abstract class CommonController extends BaseController //입력값정의 $formDatas = []; foreach ($this->getFormFields() as $field) { - $formDatas[] = $this->request->getVar($field); + $formDatas[$field] = $this->request->getVar($field); } $this->entity = $this->modify_process($entity, $formDatas); $this->getService()->getModel()->transCommit(); @@ -372,7 +373,7 @@ abstract class CommonController extends BaseController $this->setFormFields([$field]); $this->setFieldRule($field, $this->getFormFieldRule($this->getAction(), $field)); //입력값정의 - $formDatas = [$this->request->getVar($field)]; + $formDatas = [$field => $this->request->getVar($field)]; $this->entity = $this->toggle_process($entity, $formDatas); $this->getService()->getModel()->transCommit(); return $this->getResultSuccess(); @@ -400,7 +401,8 @@ abstract class CommonController extends BaseController $value = $this->request->getVar($field); if ($value) { $fields[] = $field; - $formDatas[] = $this->request->getVar($field); + //입력값정의 + $formDatas[$field] = $this->request->getVar($field); } } if (!count($fields)) { diff --git a/app/Views/auth/login_form.php b/app/Views/auth/create_form.php similarity index 100% rename from app/Views/auth/login_form.php rename to app/Views/auth/create_form.php