diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 49557ecf27123a925f5ba635ceb1f74f5812a146..beb2c546ae01287c5f7c0284e664127e8de63719 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -144,6 +144,14 @@ class JoblistController extends ActionController { $this->request->setArgument('error', NULL); } + if ($jobId === NULL && $this->settings['disallowUnsolicitedApplication']) { + $uriBuilder = $this->uriBuilder; + $uri = $uriBuilder + ->setTargetPageUid($this->settings['offersPage']) + ->build(); + $this->redirectToUri($uri, 0, 301); + } + $folderName = NULL; try { $folderName = $this->request->getArgument('folderName'); diff --git a/Configuration/TypoScript/Frontend/constants.ts b/Configuration/TypoScript/Frontend/constants.ts index 0e3a52496619590b6c86eee6054208e3cfa802b7..e0f95ba9896846d07d55c8088a24e83b6428e2ef 100644 --- a/Configuration/TypoScript/Frontend/constants.ts +++ b/Configuration/TypoScript/Frontend/constants.ts @@ -21,6 +21,10 @@ plugin.tx_sgjobs { allowedMaxFileSize = 5000 # cat=plugin.tx_sgjobs/other; type=int+; label=Page id of the privacy policy page privacyPolicyPage = 42 + # cat=plugin.tx_sgjobs/other; type=int+; UID of the offers page – you need to set this if you set disallowUnsolicitedApplication=1 + offersPage = + # cat=plugin.tx_sgjobs/other; type=int+; If set to 1, the application-form page will redirect to the overview if no jobId is passed + disallowUnsolicitedApplication = 0 } pagebrowser.settings { diff --git a/Configuration/TypoScript/Frontend/setup.ts b/Configuration/TypoScript/Frontend/setup.ts index 10ecd1410b996a724a284a704c452cc736b3aa91..a1929d9be924ba5ecc702196749af88c33f3f884 100644 --- a/Configuration/TypoScript/Frontend/setup.ts +++ b/Configuration/TypoScript/Frontend/setup.ts @@ -26,6 +26,8 @@ plugin.tx_sgjobs { allowedMimeTypes = {$plugin.tx_sgjobs.settings.allowedMimeTypes} allowedMaxFileSize = {$plugin.tx_sgjobs.settings.allowedMaxFileSize} privacyPolicyPage = {$plugin.tx_sgjobs.settings.privacyPolicyPage} + offersPage = {$plugin.tx_sgjobs.settings.offersPage} + disallowUnsolicitedApplication = {$plugin.tx_sgjobs.settings.disallowUnsolicitedApplication} } features {