cfmgrv4 init...1
This commit is contained in:
parent
f6fd1a5f16
commit
cb08006d57
@ -41,11 +41,8 @@ class AccountController extends CloudflareController
|
||||
{
|
||||
switch ($field) {
|
||||
case $this->getModel()::PARENT:
|
||||
$temps = [
|
||||
DEFAULTS['EMPTY'] => lang($this->class_path . '.label.' . $field) . ' 선택',
|
||||
];
|
||||
// $this->getAuthModel()->where('status', DEFAULTS['STATUS']);
|
||||
$options[$field] = $this->getAuthModel()->getFormFieldOption($field, $temps);
|
||||
$options[$field] = $this->getAuthModel()->getFormFieldOption($field);
|
||||
// echo $this->getAuthModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
|
||||
@ -38,11 +38,8 @@ class RecordController extends CloudflareController
|
||||
{
|
||||
switch ($field) {
|
||||
case $this->getModel()::PARENT:
|
||||
$temps = [
|
||||
DEFAULTS['EMPTY'] => lang($this->class_path . '.label.' . $field) . ' 선택',
|
||||
];
|
||||
// $this->getZoneModel()->where('status', 'active');
|
||||
$options[$field] = $this->getZoneModel()->getFormFieldOption($field, $temps);
|
||||
$options[$field] = $this->getZoneModel()->getFormFieldOption($field);
|
||||
// echo $this->getAccountModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
|
||||
@ -42,20 +42,14 @@ class ZoneController extends CloudflareController
|
||||
{
|
||||
switch ($field) {
|
||||
case $this->getModel()::PARENT:
|
||||
$temps = [
|
||||
DEFAULTS['EMPTY'] => lang($this->class_path . '.label.' . $field) . ' 선택',
|
||||
];
|
||||
// $this->getAccountModel()->where('status', DEFAULTS['STATUS']);
|
||||
$options[$field] = $this->getAccountModel()->getFormFieldOption($field, $temps);
|
||||
$options[$field] = $this->getAccountModel()->getFormFieldOption($field);
|
||||
// echo $this->getAccountModel()->getLastQuery();
|
||||
// dd($options);
|
||||
break;
|
||||
case 'type':
|
||||
case 'proxied':
|
||||
$options[$field] = [
|
||||
"" => lang($this->root . 'Record.label.' . $field) . ' 선택',
|
||||
...lang($this->root . 'Record.' . strtoupper($field)),
|
||||
];
|
||||
$options[$field] = lang($this->root . 'Record.' . strtoupper($field));
|
||||
break;
|
||||
default:
|
||||
$options = parent::getFormFieldOption($field, $options);
|
||||
|
||||
@ -22,10 +22,7 @@ abstract class MVController extends CommonController
|
||||
switch ($field) {
|
||||
default:
|
||||
// dd(lang($this->class_path . '.' . strtoupper($field)));
|
||||
$options[$field] = [
|
||||
"" => lang($this->class_path . '.label.' . $field) . ' 선택',
|
||||
...lang($this->class_path . '.' . strtoupper($field)),
|
||||
];
|
||||
$options[$field] = lang($this->class_path . '.' . strtoupper($field));
|
||||
break;
|
||||
}
|
||||
return $options;
|
||||
|
||||
@ -23,7 +23,10 @@ function getFieldForm_AccountHelper(string $field, mixed $value, array $viewData
|
||||
$value = $value ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case AccountModel::PARENT:
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, [...$extras, 'class' => "select-field"]);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, [...$extras, 'class' => "select-field"]);
|
||||
// // return form_multiselect($field, $field_options[$field], is_array($value) ? [...$value] : [$value], [$extras]);
|
||||
// foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
||||
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label;
|
||||
@ -35,7 +38,10 @@ function getFieldForm_AccountHelper(string $field, mixed $value, array $viewData
|
||||
break;
|
||||
case 'type':
|
||||
case 'status':
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, $extras);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, $extras);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
|
||||
@ -23,7 +23,10 @@ function getFieldForm_AuthHelper(string $field, mixed $value, array $viewDatas,
|
||||
$form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:60%; ::placeholder{color:silver; opacity: 1;}"]);
|
||||
break;
|
||||
case 'status':
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, $extras);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, $extras);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
|
||||
@ -23,7 +23,10 @@ function getFieldForm_RecordHelper(string $field, mixed $value, array $viewDatas
|
||||
$value = $value ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case RecordModel::PARENT:
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, [...$extras, 'class' => "select-field"]);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, [...$extras, 'class' => "select-field"]);
|
||||
// // return form_multiselect($field, $field_options[$field], is_array($value) ? [...$value] : [$value], [$extras]);
|
||||
// foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
||||
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label;
|
||||
@ -44,7 +47,10 @@ function getFieldForm_RecordHelper(string $field, mixed $value, array $viewDatas
|
||||
case "locked":
|
||||
case "proxied":
|
||||
case "proxiable":
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, $extras);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, $extras);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
|
||||
@ -23,7 +23,10 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas,
|
||||
$value = $value ?: DEFAULTS['EMPTY'];
|
||||
switch ($field) {
|
||||
case ZoneModel::PARENT:
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, [...$extras, 'class' => "select-field"]);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, [...$extras, 'class' => "select-field"]);
|
||||
// // return form_multiselect($field, $field_options[$field], is_array($value) ? [...$value] : [$value], [$extras]);
|
||||
// foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
||||
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label;
|
||||
@ -46,9 +49,17 @@ function getFieldForm_ZoneHelper(string $field, mixed $value, array $viewDatas,
|
||||
case "ipv6":
|
||||
case "security_level":
|
||||
case 'status':
|
||||
case 'type':
|
||||
case 'proxied':
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, $extras);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, $extras);
|
||||
break;
|
||||
case 'type': //A,AAA...
|
||||
case 'proxied': //CDN사용여부
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang('Admin/Cloudflare/Record.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, $extras);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
|
||||
@ -26,7 +26,10 @@ function getFieldForm_MapurlHelper(string $field, mixed $value, array $viewDatas
|
||||
$form = form_input($field, $value, ["placeholder" => "예)https://new.example.com", "style" => "width:100%; ::placeholder{color:silver; opacity: 1;}"]);
|
||||
break;
|
||||
case 'status':
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, $extras);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, $extras);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
|
||||
@ -22,15 +22,12 @@ function getFieldForm_UserHelper(string $field, mixed $value, array $viewDatas,
|
||||
case UserModel::TITLE:
|
||||
$form = form_input($field, $value, ["placeholder" => "예)test@example.com", "style" => "width:60%; ::placeholder{color:silver; opacity: 1;}"]);
|
||||
break;
|
||||
// case 'role':
|
||||
// foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
||||
// $checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label;
|
||||
// }
|
||||
// $form = implode(" ", $checkboxs);
|
||||
// break;
|
||||
case 'role':
|
||||
case 'status':
|
||||
$form = form_dropdown($field, $viewDatas['field_options'][$field], $value, $extras);
|
||||
$form = form_dropdown($field, [
|
||||
"" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택',
|
||||
...$viewDatas['field_options'][$field]
|
||||
], $value, $extras);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
@ -55,14 +52,11 @@ function getFieldView_UserHelper(string $field, UserEntity $entity, array $viewD
|
||||
]
|
||||
);
|
||||
break;
|
||||
case 'category_uid':
|
||||
foreach (array_values($viewDatas['field_options'][$field]) as $category_2depths) {
|
||||
foreach ($category_2depths as $key => $depth) {
|
||||
if ($key == $depth) {
|
||||
$value = $depth;
|
||||
}
|
||||
}
|
||||
case 'role':
|
||||
foreach ($viewDatas['field_options'][$field] as $key => $label) {
|
||||
$checkboxs[] = form_checkbox("{$field}[]", $key, in_array($key, explode(DEFAULTS["DELIMITER_ROLE"], $value))) . $label;
|
||||
}
|
||||
$value = implode(" ", $checkboxs);
|
||||
break;
|
||||
case 'updated_at':
|
||||
case 'created_at':
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/content.js"></script>
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<?= $this->include('templates/' . $viewDatas['layout'] . '/index_top'); ?>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="index_table table table-bordered table-hover table-striped">
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/content.js"></script>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<?= $this->include('templates/' . $viewDatas['layout'] . '/index_top'); ?>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="index_table table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/content.js"></script>
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<?= $this->include('templates/' . $viewDatas['layout'] . '/index_top'); ?>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="index_table table table-bordered table-hover table-striped">
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/content.js"></script>
|
||||
<?= form_open(current_url(), array("method" => "get")) ?>
|
||||
<?= $this->include('templates/' . $viewDatas['layout'] . '/index_top'); ?>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="index_table table table-bordered table-hover table-striped">
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
<?= $this->section('content') ?>
|
||||
<link href="/css/<?= $viewDatas['layout'] ?>/content.css" media="screen" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/content.js"></script>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<?= $this->include('templates/' . $viewDatas['layout'] . '/index_top'); ?>
|
||||
<?= form_open(current_url() . '/batchjob', $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||
<table class="index_table table table-bordered table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user