diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 5732f175c2680c7185d439551693c75069af9478..ba8bb33fd0b4e3e29245119a4b04e8f8eccb612b 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -423,7 +423,7 @@ class JoblistController extends ActionController { . '-' . $applicationData->getLastName(); $storage = $resourceFactory->getStorageObject(1); $applicationFilePath = Environment::getPublicPath() . '/' . $storage->getConfiguration( - )['basePath'] . 'JobApplication/' . $folderName . + )['basePath'] . 'JobApplication/' . $folderName . '/' . $newName . '.csv'; $this->writeApplicationFile($applicationData, $applicationFilePath); } @@ -469,6 +469,13 @@ class JoblistController extends ActionController { /** @var Company $company */ $applyData->setCompany($company); } + } elseif (!$applyData->getCompany()) { + $company = $this->companyRepository->findByUid( + (int) $_POST['tx_sgjobs_jobapplication']['applyData']['company'] + ); + if ($company) { + $applyData->setCompany($company); + } } $applyData->setPid($GLOBALS['TSFE']->id); @@ -589,7 +596,9 @@ class JoblistController extends ActionController { $departments = $this->departmentRepository->findAllByFilter($filters['filterByDepartment'] ?? []); $this->view->assign('departments', $departments); - $experienceLevels = $this->experienceLevelRepository->findAllByFilter($filters['filterByExperienceLevel'] ?? []); + $experienceLevels = $this->experienceLevelRepository->findAllByFilter( + $filters['filterByExperienceLevel'] ?? [] + ); $this->view->assign('experienceLevels', $experienceLevels); }