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) {
case 'modify':
$pk = $viewDatas['entity']->getPK();
$oldBatchJobUids = old("batchjob_uids") ?? [];
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
$checkbox = form_checkbox([
"id" => "checkbox_uid_{$pk}",
"name" => "batchjob_uids[]",
"value" => $pk,
"class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, $oldBatchJobUids)
]);
$checkbox = "";
if ($viewDatas['entity']->type == 'A' && $viewDatas['entity']->fixed != 'on') {
$pk = $viewDatas['entity']->getPK();
$oldBatchJobUids = old("batchjob_uids") ?? [];
$oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids];
$checkbox = form_checkbox([
"id" => "checkbox_uid_{$pk}",
"name" => "batchjob_uids[]",
"value" => $pk,
"class" => "batchjobuids_checkboxs",
"checked" => in_array($pk, $oldBatchJobUids)
]);
}
$extras = ["target" => "_self", ...$extras];
$action = $checkbox . anchor(
current_url() . "/sync/" . $viewDatas['entity']->getPK(),