Skip to content
Snippets Groups Projects
Commit 858f6ee5 authored by Sergiu-Lucian Petrica's avatar Sergiu-Lucian Petrica
Browse files

Various jobs corrections

parent ec2d039e
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,6 @@ namespace SGalinski\SgJobs\Controller\Ajax; ...@@ -27,7 +27,6 @@ namespace SGalinski\SgJobs\Controller\Ajax;
***************************************************************/ ***************************************************************/
use SGalinski\SgAjax\Controller\Ajax\AbstractAjaxController; use SGalinski\SgAjax\Controller\Ajax\AbstractAjaxController;
use SGalinski\SgJobs\Domain\Repository\JobRepository;
use SGalinski\SgJobs\Service\BackendService; use SGalinski\SgJobs\Service\BackendService;
use SGalinski\SgJobs\Service\FrontendFilterService; use SGalinski\SgJobs\Service\FrontendFilterService;
use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Resource\ResourceFactory;
...@@ -70,7 +69,7 @@ class JoblistController extends AbstractAjaxController { ...@@ -70,7 +69,7 @@ class JoblistController extends AbstractAjaxController {
$this->view->assign('countries', $this->companyRepository->getAllCountries($siteRootId)); $this->view->assign('countries', $this->companyRepository->getAllCountries($siteRootId));
// set all filtered jobs // set all filtered jobs
$this->view->assign('jobs', FrontendFilterService::getJobs($filters,$siteRootId)); $this->view->assign('jobs', FrontendFilterService::getJobs($filters, $siteRootId));
// set default selected values // set default selected values
$this->view->assign('selectedCountry', $filters['country']); $this->view->assign('selectedCountry', $filters['country']);
...@@ -84,13 +83,14 @@ class JoblistController extends AbstractAjaxController { ...@@ -84,13 +83,14 @@ class JoblistController extends AbstractAjaxController {
* Delete an uploaded file from temp storage * Delete an uploaded file from temp storage
* *
* @return void * @return void
* @throws \TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException
* @throws \TYPO3\CMS\Core\Resource\Exception\FileOperationErrorException
* @throws \InvalidArgumentException
*/ */
public function deleteTempFileAction() { public function deleteTempFileAction() {
$file = $_POST['file']; $file = $_POST['file'];
$type = $_POST['type']; $type = $_POST['type'];
$resourceFactory = GeneralUtility::makeInstance( $resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
ResourceFactory::class
);
$storage = $resourceFactory->getStorageObject(1); $storage = $resourceFactory->getStorageObject(1);
$fileObject = $storage->getFile('/Extension/temp/' . $GLOBALS['TSFE']->fe_user->id . '/' . $type . '/' . $file); $fileObject = $storage->getFile('/Extension/temp/' . $GLOBALS['TSFE']->fe_user->id . '/' . $type . '/' . $file);
$storage->deleteFile($fileObject); $storage->deleteFile($fileObject);
......
...@@ -93,6 +93,8 @@ class JoblistController extends ActionController { ...@@ -93,6 +93,8 @@ class JoblistController extends ActionController {
} }
$allowedMimeTypes = $this->settings['allowedMimeTypes']; $allowedMimeTypes = $this->settings['allowedMimeTypes'];
$this->view->assign('allowedMimeTypes', $allowedMimeTypes); $this->view->assign('allowedMimeTypes', $allowedMimeTypes);
$allowedFileExtensions = $this->settings['allowedFileExtensions'];
$this->view->assign('allowedFileExtensions', $allowedFileExtensions);
} }
/** /**
......
...@@ -229,7 +229,7 @@ class FrontendFilterService { ...@@ -229,7 +229,7 @@ class FrontendFilterService {
'tx_sgjobs_domain_model_company' 'tx_sgjobs_domain_model_company'
); );
$statement = $queryBuilder->select('a.function') $statement = $queryBuilder->select('a.job_function')
->from('tx_sgjobs_domain_model_job', 'a') ->from('tx_sgjobs_domain_model_job', 'a')
->join( ->join(
'a', 'tx_sgjobs_domain_model_company', 'b' 'a', 'tx_sgjobs_domain_model_company', 'b'
......
...@@ -38,6 +38,11 @@ The Backend module is found in the **WEB** section under the name **Job Offers** ...@@ -38,6 +38,11 @@ The Backend module is found in the **WEB** section under the name **Job Offers**
You can create a new job offer by clicking on the **New Job Offer** button. You can create a new job offer by clicking on the **New Job Offer** button.
## Job form page
When inserting the joblist plugin on a page, make sure to select the page which
contains the application form from
Plugin -> Plugin Options -> Page containing the application form
## Automated Email Messages ## Automated Email Messages
The extension uses **sg_mail** to configure email templates for the following email messages: The extension uses **sg_mail** to configure email templates for the following email messages:
......
...@@ -123,20 +123,20 @@ ...@@ -123,20 +123,20 @@
<target>Zeugnisse</target> <target>Zeugnisse</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.city" approved="yes"> <trans-unit id="frontend.apply.city" approved="yes">
<source>City</source> <source>City *</source>
<target>Ort</target> <target>Ort *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.country" approved="yes"> <trans-unit id="frontend.apply.country" approved="yes">
<source>Country</source> <source>Country *</source>
<target>Land</target> <target>Land *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.nationality" approved="yes"> <trans-unit id="frontend.apply.nationality" approved="yes">
<source>Nationality</source> <source>Nationality *</source>
<target>Nationalität</target> <target>Nationalität *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.education" approved="yes"> <trans-unit id="frontend.apply.education" approved="yes">
<source>Highest achieved education</source> <source>Highest achieved education *</source>
<target>Höchster Abschluss</target> <target>Höchster Abschluss *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.birthDate" approved="yes"> <trans-unit id="frontend.apply.birthDate" approved="yes">
<source>Birth date</source> <source>Birth date</source>
...@@ -146,21 +146,25 @@ ...@@ -146,21 +146,25 @@
<source>Cover letter</source> <source>Cover letter</source>
<target>Motivationsschreiben</target> <target>Motivationsschreiben</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.allowed_file_extensions" approved="yes">
<source>File types: </source>
<target>Datentypen: </target>
</trans-unit>
<trans-unit id="frontend.apply.cv" approved="yes"> <trans-unit id="frontend.apply.cv" approved="yes">
<source>CV</source> <source>CV</source>
<target>Lebenslauf</target> <target>Lebenslauf</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.email" approved="yes"> <trans-unit id="frontend.apply.email" approved="yes">
<source>Email</source> <source>Email *</source>
<target>E-Mail</target> <target>E-Mail *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.first_name" approved="yes"> <trans-unit id="frontend.apply.first_name" approved="yes">
<source>First name</source> <source>First name *</source>
<target>Vorname</target> <target>Vorname *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.last_name" approved="yes"> <trans-unit id="frontend.apply.last_name" approved="yes">
<source>Last name</source> <source>Last name *</source>
<target>Nachname</target> <target>Nachname *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.message" approved="yes"> <trans-unit id="frontend.apply.message" approved="yes">
<source>Message</source> <source>Message</source>
...@@ -171,8 +175,8 @@ ...@@ -171,8 +175,8 @@
<target>Mobil</target> <target>Mobil</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.phone" approved="yes"> <trans-unit id="frontend.apply.phone" approved="yes">
<source>Phone</source> <source>Phone *</source>
<target>Telefon</target> <target>Telefon *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.salutation" approved="yes"> <trans-unit id="frontend.apply.salutation" approved="yes">
<source>Salutation</source> <source>Salutation</source>
...@@ -183,16 +187,16 @@ ...@@ -183,16 +187,16 @@
<target>Geschlecht</target> <target>Geschlecht</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.street" approved="yes"> <trans-unit id="frontend.apply.street" approved="yes">
<source>Street</source> <source>Street *</source>
<target>Straße</target> <target>Straße *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.thank_you" approved="yes"> <trans-unit id="frontend.apply.thank_you" approved="yes">
<source>Thank you for your application!</source> <source>Thank you for your application!</source>
<target>Vielen Dank für Ihre Bewerbung!</target> <target>Vielen Dank für Ihre Bewerbung!</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.title" approved="yes"> <trans-unit id="frontend.apply.title" approved="yes">
<source>Job title</source> <source>Job title *</source>
<target>Job-Titel</target> <target>Job-Titel *</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.zip" approved="yes"> <trans-unit id="frontend.apply.zip" approved="yes">
<source>Zip code</source> <source>Zip code</source>
...@@ -207,7 +211,7 @@ ...@@ -207,7 +211,7 @@
<target>Initiativ-Bewerbung</target> <target>Initiativ-Bewerbung</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply_by_mail" approved="yes"> <trans-unit id="frontend.apply_by_mail" approved="yes">
<source>Appy by mail</source> <source>Apply by mail</source>
<target>Bewerbung per Post</target> <target>Bewerbung per Post</target>
</trans-unit> </trans-unit>
<trans-unit id="frontend.area" approved="yes"> <trans-unit id="frontend.area" approved="yes">
......
...@@ -94,16 +94,16 @@ ...@@ -94,16 +94,16 @@
<source>Certificates</source> <source>Certificates</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.city"> <trans-unit id="frontend.apply.city">
<source>City</source> <source>City *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.country"> <trans-unit id="frontend.apply.country">
<source>Country</source> <source>Country *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.country"> <trans-unit id="frontend.apply.nationality">
<source>Nationality</source> <source>Nationality *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.education"> <trans-unit id="frontend.apply.education">
<source>Highest achieved education</source> <source>Highest achieved education *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.birthDate"> <trans-unit id="frontend.apply.birthDate">
<source>Birth date</source> <source>Birth date</source>
...@@ -111,17 +111,20 @@ ...@@ -111,17 +111,20 @@
<trans-unit id="frontend.apply.cover_letter"> <trans-unit id="frontend.apply.cover_letter">
<source>Cover letter</source> <source>Cover letter</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.allowed_file_extensions" approved="yes">
<source>File types: </source>
</trans-unit>
<trans-unit id="frontend.apply.cv"> <trans-unit id="frontend.apply.cv">
<source>CV</source> <source>CV</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.email"> <trans-unit id="frontend.apply.email">
<source>Email</source> <source>Email *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.first_name"> <trans-unit id="frontend.apply.first_name">
<source>First name</source> <source>First name *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.last_name"> <trans-unit id="frontend.apply.last_name">
<source>Last name</source> <source>Last name *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.message"> <trans-unit id="frontend.apply.message">
<source>Message</source> <source>Message</source>
...@@ -130,7 +133,7 @@ ...@@ -130,7 +133,7 @@
<source>Mobile</source> <source>Mobile</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.phone"> <trans-unit id="frontend.apply.phone">
<source>Phone</source> <source>Phone *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.salutation"> <trans-unit id="frontend.apply.salutation">
<source>Salutation</source> <source>Salutation</source>
...@@ -139,13 +142,13 @@ ...@@ -139,13 +142,13 @@
<source>Gender</source> <source>Gender</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.street"> <trans-unit id="frontend.apply.street">
<source>Street</source> <source>Street *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.thank_you"> <trans-unit id="frontend.apply.thank_you">
<source>Thank you for your application!</source> <source>Thank you for your application!</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.title"> <trans-unit id="frontend.apply.title">
<source>Job title</source> <source>Job title *</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply.zip"> <trans-unit id="frontend.apply.zip">
<source>Zip code</source> <source>Zip code</source>
...@@ -157,7 +160,7 @@ ...@@ -157,7 +160,7 @@
<source>Apply to an unlisted position</source> <source>Apply to an unlisted position</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.apply_by_mail"> <trans-unit id="frontend.apply_by_mail">
<source>Appy by mail</source> <source>Apply by mail</source>
</trans-unit> </trans-unit>
<trans-unit id="frontend.area"> <trans-unit id="frontend.area">
<source>Area</source> <source>Area</source>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</f:form.validationResults> </f:form.validationResults>
<br /> <br />
<label for="apply-gender"><f:translate key="frontend.apply.gender" /></label> <label for="apply-gender"><f:translate key="frontend.apply.gender" /></label>
<f:form.select property="gender" id="apply-gender" data="{}" class="" options="{None: '', Male: 'Male', Female: 'Female'}" /> <f:form.select property="gender" id="apply-gender" data="{}" class="" options="{Male: 'Male', Female: 'Female'}" />
<f:form.validationResults for="applyData.gender"> <f:form.validationResults for="applyData.gender">
<f:for each="{validationResults.errors}" as="error"> <f:for each="{validationResults.errors}" as="error">
<div class="sg-jobs-validation-error"> <div class="sg-jobs-validation-error">
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
</f:form.validationResults> </f:form.validationResults>
<br /> <br />
<label for="apply-email"><f:translate key="frontend.apply.email" /></label> <label for="apply-email"><f:translate key="frontend.apply.email" /></label>
<f:form.textfield property="email" id="apply-email" data="{}" class="" /> <f:form.textfield type="email" property="email" id="apply-email" data="{}" class="" />
<f:form.validationResults for="applyData.email"> <f:form.validationResults for="applyData.email">
<f:for each="{validationResults.errors}" as="error"> <f:for each="{validationResults.errors}" as="error">
<div class="sg-jobs-validation-error"> <div class="sg-jobs-validation-error">
...@@ -144,6 +144,8 @@ ...@@ -144,6 +144,8 @@
</f:form.validationResults> </f:form.validationResults>
<br /> <br />
<label for="apply-cover-letter"><f:translate key="frontend.apply.cover_letter" /></label> <label for="apply-cover-letter"><f:translate key="frontend.apply.cover_letter" /></label>
<br/>
<label for="apply-cover-letter"><f:translate key="frontend.apply.allowed_file_extensions" />{allowedFileExtensions}</label>
<f:form.upload multiple="true" property="coverLetter" id="apply-cover-letter" additionalAttributes="{accept: '{allowedMimeTypes}'}" /> <f:form.upload multiple="true" property="coverLetter" id="apply-cover-letter" additionalAttributes="{accept: '{allowedMimeTypes}'}" />
<f:for each="{uploadedFiles.coverLetter}" as="file"> <f:for each="{uploadedFiles.coverLetter}" as="file">
<div class="sg-jobs-uploaded-file"> <div class="sg-jobs-uploaded-file">
...@@ -160,6 +162,8 @@ ...@@ -160,6 +162,8 @@
</f:form.validationResults> </f:form.validationResults>
<br /> <br />
<label for="apply-cv"><f:translate key="frontend.apply.cv" /></label> <label for="apply-cv"><f:translate key="frontend.apply.cv" /></label>
<br/>
<label for="apply-cover-letter"><f:translate key="frontend.apply.allowed_file_extensions" />{allowedFileExtensions}</label>
<f:form.upload multiple="true" property="cv" id="apply-cv" additionalAttributes="{accept: '{allowedMimeTypes}'}" /> <f:form.upload multiple="true" property="cv" id="apply-cv" additionalAttributes="{accept: '{allowedMimeTypes}'}" />
<f:for each="{uploadedFiles.cv}" as="file"> <f:for each="{uploadedFiles.cv}" as="file">
<div class="sg-jobs-uploaded-file"> <div class="sg-jobs-uploaded-file">
...@@ -176,6 +180,8 @@ ...@@ -176,6 +180,8 @@
</f:form.validationResults> </f:form.validationResults>
<br /> <br />
<label for="apply-certificates"><f:translate key="frontend.apply.certificates" /></label> <label for="apply-certificates"><f:translate key="frontend.apply.certificates" /></label>
<br/>
<label for="apply-cover-letter"><f:translate key="frontend.apply.allowed_file_extensions" />{allowedFileExtensions}</label>
<f:form.upload multiple="true" property="certificates" id="apply-certificates" additionalAttributes="{accept: '{allowedMimeTypes}'}" /> <f:form.upload multiple="true" property="certificates" id="apply-certificates" additionalAttributes="{accept: '{allowedMimeTypes}'}" />
<f:for each="{uploadedFiles.certificates}" as="file"> <f:for each="{uploadedFiles.certificates}" as="file">
<div class="sg-jobs-uploaded-file"> <div class="sg-jobs-uploaded-file">
......
...@@ -12,6 +12,7 @@ export default class FileAjax { ...@@ -12,6 +12,7 @@ export default class FileAjax {
*/ */
constructor() { constructor() {
$('.remove-file').on('click', this._removeFile); $('.remove-file').on('click', this._removeFile);
$('.sgjobs-select').on('change', this._filterJoblist());
} }
/** /**
...@@ -34,4 +35,26 @@ export default class FileAjax { ...@@ -34,4 +35,26 @@ export default class FileAjax {
currentElement.parent().remove(); currentElement.parent().remove();
}); });
} }
/**
*
* @private
*/
_filterJoblist() {
$.post(
'?eID=sgAjax&extensionName=SgJobs&controller=Ajax%5CJoblist&action=filter&format=html',
{
parameters: {
country: $('#filter-countries').val(),
location: $('#filter-locations').val(),
company: $('#filter-companies').val(),
area: $('#filter-areas').val(),
function: $('#filter-functions').val(),
}
}
).done(function(result) {
// replace filter & job list with result from ajax controller
$('#sgjobs-joblist').html(result);
});
}
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment