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 {
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Helpers\Cloudflare;
|
|
||||||
|
|
||||||
use App\Helpers\CommonHelper;
|
|
||||||
|
|
||||||
class CloudflareHelper extends CommonHelper
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -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(
|
||||||
|
|||||||
@ -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