bug fixes
Some checks are pending
Image optimization / general_image_workflow (push) Waiting to run
CI / general_module_workflow_php (push) Waiting to run
CI / general_module_workflow_js (push) Waiting to run

This commit is contained in:
Dennis Eichhorn 2024-10-11 19:17:41 +00:00
parent b093c82cca
commit 9a6025b911
3 changed files with 8 additions and 6 deletions

View File

@ -85,7 +85,7 @@ final class ApiController extends Controller
private function validateRiskCategoryCreate(RequestAbstract $request) : array
{
$val = [];
if ($val['title'] = !$request->hasData('title')) {
if ($val['content'] = !$request->hasData('content')) {
return $val;
}
@ -107,7 +107,7 @@ final class ApiController extends Controller
$category->title = new BaseStringL11n($request->getDataString('name') ?? '');
$category->setL11n(
$request->getDataString('title') ?? '',
$request->getDataString('content') ?? '',
ISO639x1Enum::tryFromValue($request->getDataString('language')) ?? ISO639x1Enum::_EN
);
@ -173,9 +173,9 @@ final class ApiController extends Controller
private function createCategoryL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{
$categoryL11n = new BaseStringL11n();
$categoryL11n->ref = $request->getDataInt('category') ?? 0;
$categoryL11n->ref = $request->getDataInt('ref') ?? 0;
$categoryL11n->language = ISO639x1Enum::tryFromValue($request->getDataString('language')) ?? $request->header->l11n->language;
$categoryL11n->content = $request->getDataString('title') ?? '';
$categoryL11n->content = $request->getDataString('content') ?? '';
return $categoryL11n;
}

View File

@ -67,7 +67,8 @@ echo $this->data['nav']->render();
<?= $this->data['l11nView']->render(
$this->data['l11nValues'],
[],
'{/api}controlling/riskmanagement/category/l11n?csrf={$CSRF}'
'{/api}controlling/riskmanagement/category/l11n?csrf={$CSRF}',
(string) $category->id
);
?>
</div>

View File

@ -67,7 +67,8 @@ echo $this->data['nav']->render();
<?= $this->data['l11nView']->render(
$this->data['l11nValues'],
[],
'{/api}controlling/riskmanagement/process/l11n?csrf={$CSRF}'
'{/api}controlling/riskmanagement/process/l11n?csrf={$CSRF}',
(string) $process->id
);
?>
</div>