From 0a693f49f55e4c5538b316bf89e7673ba73c9e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 6 Jun 2025 14:09:22 +0900 Subject: [PATCH] dbms_init...1 --- app/Controllers/CommonController.php | 12 +++++++----- app/Views/auth/{login_form.php => create_form.php} | 0 2 files changed, 7 insertions(+), 5 deletions(-) rename app/Views/auth/{login_form.php => create_form.php} (100%) 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