cfmgrv4 init...4
This commit is contained in:
parent
9320123492
commit
14ab73fdc0
@ -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
|
final protected function create_form_procedure(): RedirectResponse|string
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
@ -97,7 +99,7 @@ abstract class MVController extends CommonController
|
|||||||
$this->session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
$this->session->keepFlashdata(SESSION_NAMES['RETURN_URL']);
|
||||||
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
$this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []];
|
||||||
return view(
|
return view(
|
||||||
$this->view_path . "create",
|
$this->view_path . "create",
|
||||||
data: ['viewDatas' => $this->getViewDatas()]
|
data: ['viewDatas' => $this->getViewDatas()]
|
||||||
);
|
);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@ -348,7 +350,7 @@ abstract class MVController extends CommonController
|
|||||||
$this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY'];
|
$this->order_value = $this->request->getVar('order_value') ?: DEFAULTS['EMPTY'];
|
||||||
$this->getModel()->setList_OrderBy(
|
$this->getModel()->setList_OrderBy(
|
||||||
$this->order_field !== DEFAULTS['EMPTY'] &&
|
$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) {
|
if ($this->page) {
|
||||||
$this->getModel()->limit(
|
$this->getModel()->limit(
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Helpers\Cloudflare;
|
|
||||||
|
|
||||||
use App\Helpers\CommonHelper;
|
|
||||||
|
|
||||||
class CloudflareHelper extends CommonHelper
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -27,7 +27,7 @@ class RecordHelper extends CommonHelper
|
|||||||
$form = form_input($field, $value, [
|
$form = form_input($field, $value, [
|
||||||
"placeholder" => "예)www.example.com",
|
"placeholder" => "예)www.example.com",
|
||||||
"style" =>
|
"style" =>
|
||||||
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
||||||
...$extras
|
...$extras
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
@ -41,7 +41,7 @@ class RecordHelper extends CommonHelper
|
|||||||
$form = form_input($field, $value, [
|
$form = form_input($field, $value, [
|
||||||
"placeholder" => "예)123.123.123.123",
|
"placeholder" => "예)123.123.123.123",
|
||||||
"style" =>
|
"style" =>
|
||||||
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
||||||
...$extras
|
...$extras
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
@ -114,12 +114,14 @@ class RecordHelper extends CommonHelper
|
|||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'modify':
|
case 'modify':
|
||||||
$pk = $viewDatas['entity']->getPK();
|
$pk = $viewDatas['entity']->getPK();
|
||||||
|
$oldBatchJobUids = old("batchjob_uids", []);
|
||||||
|
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
|
||||||
$checkbox = form_checkbox([
|
$checkbox = form_checkbox([
|
||||||
"id" => "checkbox_uid_{$pk}",
|
"id" => "checkbox_uid_{$pk}",
|
||||||
"name" => "batchjob_uids[]",
|
"name" => "batchjob_uids[]",
|
||||||
"value" => $pk,
|
"value" => $pk,
|
||||||
"class" => "batchjobuids_checkboxs",
|
"class" => "batchjobuids_checkboxs",
|
||||||
"checked" => in_array($pk, old("batchjob_uids[]", []))
|
"checked" => in_array($pk, $oldBatchJobUids)
|
||||||
]);
|
]);
|
||||||
$extras = ["target" => "_self", ...$extras];
|
$extras = ["target" => "_self", ...$extras];
|
||||||
$action = $checkbox . anchor(
|
$action = $checkbox . anchor(
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class ZoneHelper extends CommonHelper
|
|||||||
$form = form_input($field, $value, [
|
$form = form_input($field, $value, [
|
||||||
"placeholder" => "예)exmaple.com",
|
"placeholder" => "예)exmaple.com",
|
||||||
"style" =>
|
"style" =>
|
||||||
"width:100%; ::placeholder{color:silver; opacity: 1;}",
|
"width:100%; ::placeholder{color:silver; opacity: 1;}",
|
||||||
...$extras
|
...$extras
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
@ -44,7 +44,7 @@ class ZoneHelper extends CommonHelper
|
|||||||
$form = form_input($field, $value, [
|
$form = form_input($field, $value, [
|
||||||
"placeholder" => "예)123.123.123.123",
|
"placeholder" => "예)123.123.123.123",
|
||||||
"style" =>
|
"style" =>
|
||||||
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
"width:200px; ::placeholder{color:silver; opacity: 1;}",
|
||||||
...$extras
|
...$extras
|
||||||
]);
|
]);
|
||||||
break;
|
break;
|
||||||
@ -138,12 +138,14 @@ class ZoneHelper extends CommonHelper
|
|||||||
switch ($action) {
|
switch ($action) {
|
||||||
case 'modify':
|
case 'modify':
|
||||||
$pk = $viewDatas['entity']->getPK();
|
$pk = $viewDatas['entity']->getPK();
|
||||||
|
$oldBatchJobUids = old("batchjob_uids", []);
|
||||||
|
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
|
||||||
$checkbox = form_checkbox([
|
$checkbox = form_checkbox([
|
||||||
"id" => "checkbox_uid_{$pk}",
|
"id" => "checkbox_uid_{$pk}",
|
||||||
"name" => "batchjob_uids[]",
|
"name" => "batchjob_uids[]",
|
||||||
"value" => $pk,
|
"value" => $pk,
|
||||||
"class" => "batchjobuids_checkboxs",
|
"class" => "batchjobuids_checkboxs",
|
||||||
"checked" => in_array($pk, old("batchjob_uids[]", []))
|
"checked" => in_array($pk, $oldBatchJobUids)
|
||||||
]);
|
]);
|
||||||
$extras = ["target" => "_self", ...$extras];
|
$extras = ["target" => "_self", ...$extras];
|
||||||
$action = $checkbox . anchor(
|
$action = $checkbox . anchor(
|
||||||
|
|||||||
@ -4,7 +4,9 @@ namespace App\Helpers;
|
|||||||
|
|
||||||
abstract class CommonHelper
|
abstract class CommonHelper
|
||||||
{
|
{
|
||||||
protected function __construct() {}
|
protected function __construct()
|
||||||
|
{
|
||||||
|
}
|
||||||
final public function getRandomString($length = 10, $characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
|
final public function getRandomString($length = 10, $characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
|
||||||
{
|
{
|
||||||
return substr(str_shuffle($characters), 0, $length);
|
return substr(str_shuffle($characters), 0, $length);
|
||||||
@ -231,12 +233,14 @@ abstract class CommonHelper
|
|||||||
break;
|
break;
|
||||||
case 'modify':
|
case 'modify':
|
||||||
$pk = $viewDatas['entity']->getPK();
|
$pk = $viewDatas['entity']->getPK();
|
||||||
|
$oldBatchJobUids = old("batchjob_uids", []);
|
||||||
|
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
|
||||||
$checkbox = form_checkbox([
|
$checkbox = form_checkbox([
|
||||||
"id" => "checkbox_uid_{$pk}",
|
"id" => "checkbox_uid_{$pk}",
|
||||||
"name" => "batchjob_uids[]",
|
"name" => "batchjob_uids[]",
|
||||||
"value" => $pk,
|
"value" => $pk,
|
||||||
"class" => "batchjobuids_checkboxs",
|
"class" => "batchjobuids_checkboxs",
|
||||||
"checked" => in_array($pk, old("batchjob_uids[]", []))
|
"checked" => in_array($pk, $oldBatchJobUids)
|
||||||
]);
|
]);
|
||||||
$action = $checkbox . form_label(
|
$action = $checkbox . form_label(
|
||||||
$viewDatas['cnt'],
|
$viewDatas['cnt'],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user