cfmgrv4 init...3

This commit is contained in:
최준흠 2024-10-16 19:19:01 +09:00
parent 40e4e600a9
commit 6145dc68a6

View File

@ -126,16 +126,19 @@ class RecordHelper extends CommonHelper
{ {
switch ($action) { switch ($action) {
case 'modify': case 'modify':
$pk = $viewDatas['entity']->getPK(); $checkbox = "";
$oldBatchJobUids = old("batchjob_uids") ?? []; if ($viewDatas['entity']->type == 'A' && $viewDatas['entity']->fixed != 'on') {
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids]; $pk = $viewDatas['entity']->getPK();
$checkbox = form_checkbox([ $oldBatchJobUids = old("batchjob_uids") ?? [];
"id" => "checkbox_uid_{$pk}", $oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
"name" => "batchjob_uids[]", $checkbox = form_checkbox([
"value" => $pk, "id" => "checkbox_uid_{$pk}",
"class" => "batchjobuids_checkboxs", "name" => "batchjob_uids[]",
"checked" => in_array($pk, $oldBatchJobUids) "value" => $pk,
]); "class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, $oldBatchJobUids)
]);
}
$extras = ["target" => "_self", ...$extras]; $extras = ["target" => "_self", ...$extras];
$action = $checkbox . anchor( $action = $checkbox . anchor(
current_url() . "/sync/" . $viewDatas['entity']->getPK(), current_url() . "/sync/" . $viewDatas['entity']->getPK(),