cfmgrv4 init...1
This commit is contained in:
parent
99f88a6a92
commit
9c69e478fe
@ -28,10 +28,27 @@ class AccountController extends CloudflareController
|
||||
}
|
||||
return $this->_myLibrary;
|
||||
}
|
||||
//Field별 Form Input용
|
||||
protected function getFormFieldInput(string $field, string $value, array $inputs = []): array
|
||||
{
|
||||
switch ($field) {
|
||||
case 'type':
|
||||
$inputs[$field] = form_dropdown(
|
||||
$field,
|
||||
$this->getFormFieldInputOption($field),
|
||||
$value
|
||||
);
|
||||
break;
|
||||
default:
|
||||
$inputs[$field] = parent::getFormFieldInput($field, $value, $inputs);
|
||||
break;
|
||||
}
|
||||
return $inputs;
|
||||
}
|
||||
protected function create_init(): void
|
||||
{
|
||||
$this->fields = [$this->getMyLibrary()->getMyStorage()::TITLE, 'authkey', 'status'];
|
||||
$this->filter_fields = ['status'];
|
||||
$this->filter_fields = ['type', 'status'];
|
||||
$this->action = DB_ACTION['CREATE'];
|
||||
$this->getMyLibrary()->getMyStorage()->setAction($this->action);
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ abstract class MVController extends CommonController
|
||||
default:
|
||||
$options = [
|
||||
"" => lang($this->class_name . '.label.' . $field) . ' 선택',
|
||||
...lang($this->class_name . '.' . strtoupper($field)),
|
||||
lang($this->class_name . '.' . strtoupper($field)),
|
||||
];
|
||||
break;
|
||||
}
|
||||
@ -57,7 +57,7 @@ abstract class MVController extends CommonController
|
||||
if (is_array($field)) {
|
||||
throw new \Exception(__FUNCTION__ . "에서 field array 입니다.\n" . var_export($field, true));
|
||||
}
|
||||
$inputs = $this->getFormFieldInput($field, old($field) ?? DEFAULTS['EMPTY'], $inputs);
|
||||
$inputs = $this->getFormFieldInput($field, old($field) ?: DEFAULTS['EMPTY'], $inputs);
|
||||
}
|
||||
return $inputs;
|
||||
}
|
||||
@ -283,6 +283,8 @@ abstract class MVController extends CommonController
|
||||
public function list_process(): string
|
||||
{
|
||||
try {
|
||||
//입력폼처리
|
||||
$this->forminputs = $this->getFormFieldInputs();
|
||||
//URL처리
|
||||
$this->uri = $this->request->getUri();
|
||||
//total 처리
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
<div class="top container-fluid">
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<nav class="nav">
|
||||
조건검색:<?php foreach ($viewDatas['fieldFilters'] as $field): ?><?= getFieldFilter_UserHelper($field, $viewDatas[$field], $viewDatas) ?><?php endforeach ?>
|
||||
<?= dd($viewDatas['forminputs']) ?>
|
||||
조건검색:<?php foreach ($viewDatas['filter_fields'] as $field): ?><?= $viewDatas['forminputs'][$field] ?><?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include('templates/admin/index_head') ?>
|
||||
<?= form_close() ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user