diff --git a/app/Controllers/MVController.php b/app/Controllers/MVController.php index cc5136c..41d6b66 100644 --- a/app/Controllers/MVController.php +++ b/app/Controllers/MVController.php @@ -88,7 +88,9 @@ abstract class MVController extends CommonController )); } } - protected function create_form_process(): void {} + protected function create_form_process(): void + { + } final protected function create_form_procedure(): RedirectResponse|string { try { @@ -97,7 +99,7 @@ abstract class MVController extends CommonController $this->session->keepFlashdata(SESSION_NAMES['RETURN_URL']); $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []]; return view( - $this->view_path . "create", + $this->view_path . "create", data: ['viewDatas' => $this->getViewDatas()] ); } catch (\Exception $e) { @@ -348,7 +350,7 @@ abstract class MVController extends CommonController $this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY']; $this->getModel()->setList_OrderBy( $this->order_field !== DEFAULTS['EMPTY'] && - $this->order_value !== DEFAULTS['EMPTY'] ? "{$this->order_field} {$this->order_value}" : "" + $this->order_value !== DEFAULTS['EMPTY'] ? "{$this->order_field} {$this->order_value}" : "" ); if ($this->page) { $this->getModel()->limit( diff --git a/app/Helpers/Cloudflare/CloudflareHelper.php b/app/Helpers/Cloudflare/CloudflareHelper.php deleted file mode 100644 index fe7680a..0000000 --- a/app/Helpers/Cloudflare/CloudflareHelper.php +++ /dev/null @@ -1,13 +0,0 @@ - "예)www.example.com", "style" => - "width:200px; ::placeholder{color:silver; opacity: 1;}", + "width:200px; ::placeholder{color:silver; opacity: 1;}", ...$extras ]); break; @@ -41,7 +41,7 @@ class RecordHelper extends CommonHelper $form = form_input($field, $value, [ "placeholder" => "예)123.123.123.123", "style" => - "width:200px; ::placeholder{color:silver; opacity: 1;}", + "width:200px; ::placeholder{color:silver; opacity: 1;}", ...$extras ]); break; @@ -114,12 +114,14 @@ class RecordHelper extends CommonHelper switch ($action) { case 'modify': $pk = $viewDatas['entity']->getPK(); + $oldBatchJobUids = old("batchjob_uids", []); + $oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids]; $checkbox = form_checkbox([ "id" => "checkbox_uid_{$pk}", "name" => "batchjob_uids[]", "value" => $pk, "class" => "batchjobuids_checkboxs", - "checked" => in_array($pk, old("batchjob_uids[]", [])) + "checked" => in_array($pk, $oldBatchJobUids) ]); $extras = ["target" => "_self", ...$extras]; $action = $checkbox . anchor( diff --git a/app/Helpers/Cloudflare/ZoneHelper.php b/app/Helpers/Cloudflare/ZoneHelper.php index 079af2d..1c3d148 100644 --- a/app/Helpers/Cloudflare/ZoneHelper.php +++ b/app/Helpers/Cloudflare/ZoneHelper.php @@ -27,7 +27,7 @@ class ZoneHelper extends CommonHelper $form = form_input($field, $value, [ "placeholder" => "예)exmaple.com", "style" => - "width:100%; ::placeholder{color:silver; opacity: 1;}", + "width:100%; ::placeholder{color:silver; opacity: 1;}", ...$extras ]); break; @@ -44,7 +44,7 @@ class ZoneHelper extends CommonHelper $form = form_input($field, $value, [ "placeholder" => "예)123.123.123.123", "style" => - "width:200px; ::placeholder{color:silver; opacity: 1;}", + "width:200px; ::placeholder{color:silver; opacity: 1;}", ...$extras ]); break; @@ -138,12 +138,14 @@ class ZoneHelper extends CommonHelper switch ($action) { case 'modify': $pk = $viewDatas['entity']->getPK(); + $oldBatchJobUids = old("batchjob_uids", []); + $oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids]; $checkbox = form_checkbox([ "id" => "checkbox_uid_{$pk}", "name" => "batchjob_uids[]", "value" => $pk, "class" => "batchjobuids_checkboxs", - "checked" => in_array($pk, old("batchjob_uids[]", [])) + "checked" => in_array($pk, $oldBatchJobUids) ]); $extras = ["target" => "_self", ...$extras]; $action = $checkbox . anchor( diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index eb3af42..35e533b 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -4,7 +4,9 @@ namespace App\Helpers; abstract class CommonHelper { - protected function __construct() {} + protected function __construct() + { + } final public function getRandomString($length = 10, $characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") { return substr(str_shuffle($characters), 0, $length); @@ -231,12 +233,14 @@ abstract class CommonHelper break; case 'modify': $pk = $viewDatas['entity']->getPK(); + $oldBatchJobUids = old("batchjob_uids", []); + $oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids]; $checkbox = form_checkbox([ "id" => "checkbox_uid_{$pk}", "name" => "batchjob_uids[]", "value" => $pk, "class" => "batchjobuids_checkboxs", - "checked" => in_array($pk, old("batchjob_uids[]", [])) + "checked" => in_array($pk, $oldBatchJobUids) ]); $action = $checkbox . form_label( $viewDatas['cnt'],