diff --git a/Classes/Controller/JoblistController.php b/Classes/Controller/JoblistController.php index 07f2fc0bdb59294a103874fe990fee4472b84fe1..24312505dd850a5e6a01ba71ff60768fb6e9ec6b 100644 --- a/Classes/Controller/JoblistController.php +++ b/Classes/Controller/JoblistController.php @@ -156,12 +156,18 @@ class JoblistController extends ActionController { $this->view->assign('folderName', $folderName); $job = NULL; + if (!$uid !== NULL) { /** @var Job $job */ $job = $this->jobRepository->findByUid($uid); if ($job) { $GLOBALS['TSFE']->page['titlebyextension'] = $job->getTitle(); $GLOBALS['TSFE']->page['description'] = substr($job->getDescription(), 0, 200); + } else { + $storagePid = (int) $this->configurationManager->getConfiguration( + ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK + )['persistence']['storagePid']; + $this->view->assign('companies', $this->companyRepository->getAllCompanies($storagePid)); } $this->view->assign('job', $job); } @@ -290,16 +296,14 @@ class JoblistController extends ActionController { if ($job !== NULL) { /** @var Contact $contact */ $contact = $job->getContact(); - if ($contact === NULL) { - $contact = $this->contactRepository->findByUid((int) $this->settings['defaultContactId']); - } - } else { - $contact = $this->contactRepository->findByUid((int) $this->settings['defaultContactId']); } if ($contact !== NULL) { $mailService->setToAddresses($contact->getEmail()); + } else { + $mailService->setToAddresses($applyData->getCompany()->getContact()->getEmail()); } + $mailService->setMarkers(['application' => $applyData]); $mailService->setIgnoreMailQueue(TRUE); diff --git a/Classes/Domain/Model/Company.php b/Classes/Domain/Model/Company.php index 81d30fd548bfbcbba30d52e62438a577afa3dd90..bdc6193f0673f5479c4a38e1fa37af1c82985196 100644 --- a/Classes/Domain/Model/Company.php +++ b/Classes/Domain/Model/Company.php @@ -57,6 +57,11 @@ class Company extends AbstractEntity { */ protected $description = ''; + /** + * @var \SGalinski\SgJobs\Domain\Model\Contact $contact + */ + protected $contact; + /** * @return string */ @@ -126,4 +131,18 @@ class Company extends AbstractEntity { public function setStreet(string $street) { $this->street = $street; } + + /** + * @return \SGalinski\SgJobs\Domain\Model\Contact + */ + public function getContact() { + return $this->contact; + } + + /** + * @param \SGalinski\SgJobs\Domain\Model\Contact $contact + */ + public function setContact(Contact $contact) { + $this->contact = $contact; + } } diff --git a/Classes/Domain/Model/Contact.php b/Classes/Domain/Model/Contact.php index a162e7dced8a72bcc17b4d6a6c43d2916e29b7fe..e8978eff8df04ae91b2809dc864d7c0ef40455a9 100644 --- a/Classes/Domain/Model/Contact.php +++ b/Classes/Domain/Model/Contact.php @@ -42,11 +42,6 @@ class Contact extends AbstractEntity { */ protected $lastName = ''; - /** - * @var string $company - */ - protected $company = ''; - /** * @var string $city */ @@ -67,6 +62,11 @@ class Contact extends AbstractEntity { */ protected $phone = ''; + /** + * @var bool + */ + protected $hideInFrontend = FALSE; + /** * @return string */ @@ -95,20 +95,6 @@ class Contact extends AbstractEntity { $this->lastName = $lastName; } - /** - * @return string - */ - public function getCompany() { - return $this->company; - } - - /** - * @param string $company - */ - public function setCompany(string $company) { - $this->company = $company; - } - /** * @return string */ @@ -164,4 +150,18 @@ class Contact extends AbstractEntity { public function setPhone(string $phone) { $this->phone = $phone; } + + /** + * @return bool + */ + public function isHideInFrontend() { + return $this->hideInFrontend; + } + + /** + * @param bool $hideInFrontend + */ + public function setHideInFrontend(bool $hideInFrontend) { + $this->hideInFrontend = $hideInFrontend; + } } diff --git a/Classes/Domain/Model/Job.php b/Classes/Domain/Model/Job.php index 152b7fc708100b571bf477bdcdd53c0f3602d3ea..df52d7145153c4452ed35364569b71f702197690 100644 --- a/Classes/Domain/Model/Job.php +++ b/Classes/Domain/Model/Job.php @@ -74,7 +74,7 @@ class Job extends AbstractEntity { protected $startDate = 0; /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\SGalinski\SgJobs\Domain\Model\Company> $company + * @var \SGalinski\SgJobs\Domain\Model\Company $company */ protected $company = ''; @@ -159,16 +159,16 @@ class Job extends AbstractEntity { } /** - * @return string + * @return Company */ public function getCompany() { return $this->company; } /** - * @param ObjectStorage $company + * @param Company $company */ - public function setCompany(ObjectStorage $company) { + public function setCompany(Company $company) { $this->company = $company; } diff --git a/Classes/Domain/Model/JobApplication.php b/Classes/Domain/Model/JobApplication.php index 03c76e6ed5e76e3dda7db82c573a2a377fa6f6da..e9319eb0fcd3514e47181cc0c570ce7500a94f03 100644 --- a/Classes/Domain/Model/JobApplication.php +++ b/Classes/Domain/Model/JobApplication.php @@ -46,6 +46,12 @@ class JobApplication extends AbstractEntity { */ protected $jobTitle = ''; + /** + * @var \SGalinski\SgJobs\Domain\Model\Company $company + * @validate NotEmpty + */ + protected $company; + /** * @var \SGalinski\SgJobs\Domain\Model\Job $job */ @@ -430,4 +436,18 @@ class JobApplication extends AbstractEntity { public function setJob(Job $job) { $this->job = $job; } + + /** + * @return Company + */ + public function getCompany() { + return $this->company; + } + + /** + * @param Company $company + */ + public function setCompany(Company $company) { + $this->company = $company; + } } diff --git a/Classes/Domain/Repository/CompanyRepository.php b/Classes/Domain/Repository/CompanyRepository.php index b5fbffae720de52761a76dbc2581adf0e32f347e..0ac97ee2b9cca998ff2276b6ef8ce79ec03afe76 100644 --- a/Classes/Domain/Repository/CompanyRepository.php +++ b/Classes/Domain/Repository/CompanyRepository.php @@ -152,4 +152,34 @@ class CompanyRepository extends Repository { return $namesArray; } + + + + /** + * Returns all companies filtered by page id + * + * @param int $pageUid + * @return mixed + * @throws \InvalidArgumentException + */ + public function getAllCompanies($pageUid) { + $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable( + self::TABLENAME + ); + + $queryBuilder + ->getRestrictions() + ->removeAll() + ->add(GeneralUtility::makeInstance(DeletedRestriction::class)) + ->add(GeneralUtility::makeInstance(FrontendRestrictionContainer::class)); + $statement = $queryBuilder->select('*')->from('tx_sgjobs_domain_model_company'); + + $statement->where( + $queryBuilder->expr()->eq( + 'pid', $queryBuilder->createNamedParameter($pageUid) + ) + ); + + return $statement->execute(); + } } diff --git a/Configuration/TCA/tx_sgjobs_domain_model_company.php b/Configuration/TCA/tx_sgjobs_domain_model_company.php index 0b1dcaba6bd97ff3a724a38b15133181d31c406f..e808ef80031e928c58e64fe8713f02489d0fb050 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_company.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_company.php @@ -8,7 +8,7 @@ return [ 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'dividers2tabs' => TRUE, - 'searchFields' => 'city, country, description, name, street', + 'searchFields' => 'city, country, description, name, street, contact', 'versioningWS' => 2, 'versioning_followPages' => TRUE, 'origUid' => 't3_origuid', @@ -26,12 +26,12 @@ return [ 'Resources/Public/Icons/tx_sgjobs_domain_model_company.svg' ], 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, city, street name, country, description', + 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, city, street name, country, description, contact', ], 'types' => [ '1' => [ 'showitem' => '--palette--;;sysLanguageAndHidden, - city, street,name, country, description;;;richtext[*]:rte_transform[mode=ts], + city, street,name, country, description, contact;;;richtext[*]:rte_transform[mode=ts], --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime', ], ], @@ -167,5 +167,27 @@ return [ 'eval' => 'trim' ], ], + 'contact' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.contact', + 'config' => [ + 'type' => 'select', + 'eval' => 'required', + 'renderType' => 'selectSingle', + 'internal_type' => 'db', + 'foreign_table' => 'tx_sgjobs_domain_model_contact', + 'size' => 1, + 'maxitems' => 1, + 'multiple' => 0, + 'fieldControl' => [ + 'editPopup' => [ + 'disabled' => FALSE, + ], + 'addRecord' => [ + 'disabled' => FALSE, + ] + ], + ] + ] ], ]; \ No newline at end of file diff --git a/Configuration/TCA/tx_sgjobs_domain_model_contact.php b/Configuration/TCA/tx_sgjobs_domain_model_contact.php index e8f4c3ce8a258f9bc081452bd51040dcdd98c215..66b777b4e17ddff46f7ed28456d815bccf8fda2d 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_contact.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_contact.php @@ -8,7 +8,7 @@ return [ 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'dividers2tabs' => TRUE, - 'searchFields' => 'first_name, last_name, company, city, zip, email, phone', + 'searchFields' => 'first_name, last_name, city, zip, email, phone, hide_in_frontend', 'versioningWS' => 2, 'versioning_followPages' => TRUE, 'origUid' => 't3_origuid', @@ -26,12 +26,12 @@ return [ 'Resources/Public/Icons/tx_sgjobs_domain_model_contact.svg' ], 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, first_name, last_name, company, city, zip, email, phone', + 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, first_name, last_name, city, zip, email, phone, hide_in_frontend', ], 'types' => [ '1' => [ 'showitem' => '--palette--;;sysLanguageAndHidden, - first_name, last_name, company, city, zip, email, phone;;;richtext[*]:rte_transform[mode=ts], + hide_in_frontend, first_name, last_name, city, zip, email, phone;;;richtext[*]:rte_transform[mode=ts], --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime', ], ], @@ -145,15 +145,6 @@ return [ 'eval' => 'trim, required' ], ], - 'company' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_contact.company', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim, required' - ], - ], 'city' => [ 'exclude' => 0, 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_contact.city', @@ -189,6 +180,13 @@ return [ 'size' => 30, 'eval' => 'trim, required' ], + ], + 'hide_in_frontend' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_contact.hide_in_frontend', + 'config' => [ + 'type' => 'check', + ], ] ], ]; \ No newline at end of file diff --git a/Configuration/TCA/tx_sgjobs_domain_model_job.php b/Configuration/TCA/tx_sgjobs_domain_model_job.php index 7ed86f02113993ca0d73dc8ce4b3773ca9f9f1ba..41cfa9dbecdd404cc6937cda4429971c71dd3eea 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_job.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_job.php @@ -218,7 +218,7 @@ return [ ], 'company' => [ 'exclude' => 0, - 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.location', + 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.company', 'config' => [ 'type' => 'select', 'eval' => 'required', diff --git a/Configuration/TCA/tx_sgjobs_domain_model_job_application.php b/Configuration/TCA/tx_sgjobs_domain_model_job_application.php index 804842aa1ac1ce09804bab64e265ba658f887029..91caf77bffc278900bd5dbbaf542cef93a349cd5 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_job_application.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_job_application.php @@ -12,7 +12,7 @@ $tx_sgjobs_domain_model_job_application = [ 'crdate' => 'crdate', 'cruser_id' => 'cruser_id', 'dividers2tabs' => TRUE, - 'searchFields' => 'job_id, job, job_title, gender, first_name, last_name, street, city, zip, country, nationality, education, birth_date, phone, mobile, email, message, cover_letter, certificate, cv', + 'searchFields' => 'job_id, job, job_title, company, gender, first_name, last_name, street, city, zip, country, nationality, education, birth_date, phone, mobile, email, message, cover_letter, certificate, cv', 'versioningWS' => 2, 'versioning_followPages' => TRUE, 'origUid' => 't3_origuid', @@ -30,12 +30,12 @@ $tx_sgjobs_domain_model_job_application = [ 'Resources/Public/Icons/tx_sgjobs_domain_model_job.svg' ], 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job, job_id, job_title, area, start_date, alternative_start_date, + 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, job, job_id, job_title, company, area, start_date, alternative_start_date, company, task, qualification, description, contact', ], 'types' => [ '1' => [ - 'showitem' => '--palette--;;sysLanguageAndHidden,job_id, job, job_title, gender, first_name, last_name, street, city, zip, + 'showitem' => '--palette--;;sysLanguageAndHidden,job_id, job, job_title, company, gender, first_name, last_name, street, city, zip, country, nationality, education, birth_date, phone, mobile, email, message, cover_letter, cv, certificate, div;;richtext[*]:rte_transform[mode=ts], --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime', @@ -167,6 +167,28 @@ $tx_sgjobs_domain_model_job_application = [ 'eval' => 'trim' ], ], + 'company' => [ + 'exclude' => 0, + 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.company', + 'config' => [ + 'type' => 'select', + 'eval' => 'required', + 'renderType' => 'selectSingle', + 'internal_type' => 'db', + 'foreign_table' => 'tx_sgjobs_domain_model_company', + 'size' => 1, + 'maxitems' => 1, + 'multiple' => 0, + 'fieldControl' => [ + 'editPopup' => [ + 'disabled' => FALSE, + ], + 'addRecord' => [ + 'disabled' => FALSE, + ] + ], + ] + ], 'gender' => [ 'exclude' => 0, 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job_application.gender', diff --git a/Configuration/TypoScript/Frontend/setup.ts b/Configuration/TypoScript/Frontend/setup.ts index 26f79142ffddaef53e104b4a13f624719ea73c51..96c8aeeb2696d175560fa4411d57f4c20daa3923 100644 --- a/Configuration/TypoScript/Frontend/setup.ts +++ b/Configuration/TypoScript/Frontend/setup.ts @@ -24,7 +24,6 @@ plugin.tx_sgjobs { settings { allowedFileExtensions = {$plugin.tx_sgjobs.settings.allowedFileExtensions} allowedMimeTypes = {$plugin.tx_sgjobs.settings.allowedMimeTypes} - defaultContactId = 1 defaultJobId = 28 } diff --git a/README.md b/README.md index fece6cd0da092f3611cb1d29a11ea7c1e1970d23..b462a18dd68519f7ec7974ff54e012c09210425d 100644 --- a/README.md +++ b/README.md @@ -38,22 +38,10 @@ 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. -## Defining a default Job (unsoliticed Application) -In your typoscript settings you can set a job id, which will be used for all **unsoliticed Applications**. -If nothing is set, unsolicited applications are not connected to any job offer. - -``` - settings.defaultJobId = 1 -``` - ## Setting the contact email When a user applies to a job offer an email will be send. The adress of this email comes either from the -**contact person** assigned to the job, ot if no contact person is set, you can set a default contact person -in your TypoScript settings: - -``` - settings.defaultContactId = 1 -``` +**contact person** assigned to the job, ot if no contact person is set, the mail address is chosen from the selected +location. Simply supply the uid of the contact record and every job without a contact person will use the desired contact. diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf index ececcb8816935f9dc3cddfcfbd28d897c1b31d9b..f9ead3eaa37a9598b04bfd301f900f68a7b6b53b 100644 --- a/Resources/Private/Language/de.locallang.xlf +++ b/Resources/Private/Language/de.locallang.xlf @@ -202,6 +202,10 @@ <source>Last name *</source> <target>Nachname *</target> </trans-unit> + <trans-unit id="frontend.apply.location" approved="yes"> + <source>Location*</source> + <target>Standort*</target> + </trans-unit> <trans-unit id="frontend.apply.message" approved="yes"> <source>Message</source> <target>Ihre Nachricht</target> diff --git a/Resources/Private/Language/de.locallang_db.xlf b/Resources/Private/Language/de.locallang_db.xlf index 8f1bfd3ba8fd01916ae9b83b3cc90a7e242bd67f..c4765479dc333b614025f4f1f39f051ee38275f2 100644 --- a/Resources/Private/Language/de.locallang_db.xlf +++ b/Resources/Private/Language/de.locallang_db.xlf @@ -97,6 +97,10 @@ <source>First name</source> <target>Vorname</target> </trans-unit> + <trans-unit id="tx_sgjobs_domain_model_contact.hide_in_frontend" approved="yes"> + <source>Hide contact information on the website</source> + <target>Kontaktinformationen auf Website ausblenden</target> + </trans-unit> <trans-unit id="tx_sgjobs_domain_model_contact.last_name" approved="yes"> <source>Last name</source> <target>Nachname</target> diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf index 119ab738d293de2218b0584e8b5043fd994694cd..2ee2be82e5d3146faa9b800eb61e47ce72c5af3e 100644 --- a/Resources/Private/Language/locallang.xlf +++ b/Resources/Private/Language/locallang.xlf @@ -153,6 +153,9 @@ <trans-unit id="frontend.apply.last_name"> <source>Last name *</source> </trans-unit> + <trans-unit id="frontend.apply.location"> + <source>Location*</source> + </trans-unit> <trans-unit id="frontend.apply.message"> <source>Message</source> </trans-unit> diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf index 1a5ea2c5d674bb146af7a1a1bc6cddfef73f76c4..019e0a6269e0577cff2a46d74eb6c44acdc16295 100644 --- a/Resources/Private/Language/locallang_db.xlf +++ b/Resources/Private/Language/locallang_db.xlf @@ -75,6 +75,9 @@ <trans-unit id="tx_sgjobs_domain_model_contact.first_name"> <source>First name</source> </trans-unit> + <trans-unit id="tx_sgjobs_domain_model_contact.hide_in_frontend"> + <source>Hide contact information on the website</source> + </trans-unit> <trans-unit id="tx_sgjobs_domain_model_contact.last_name"> <source>Last name</source> </trans-unit> diff --git a/Resources/Private/Partials/Job.html b/Resources/Private/Partials/Job.html index 82f18e2af1f0459860b8a1ca489639ba2679a646..904ad622390902ea2d329a84cfba389e68b4dc86 100644 --- a/Resources/Private/Partials/Job.html +++ b/Resources/Private/Partials/Job.html @@ -4,7 +4,8 @@ <div class="pia-card-header"> <h2>{job.title}</h2> <h3> - <f:for each="{job.company}" as="company">{company.city}</f:for> – + <f:for each="{job.company}" as="company">{company.city}</f:for> + – <f:if condition="{job.alternativeStartDate}"> <f:then> {job.alternativeStartDate} @@ -30,14 +31,14 @@ <h3><f:translate key="frontend.location" /></h3> <p> - {job.company.0.country} - {job.company.0.city} + {job.company.country} - {job.company.city} </p> <h3><f:translate key="frontend.area" /></h3> <p>{job.area}</p> <h3><f:translate key="frontend.organisation" /></h3> - <p>{job.company.0.name}</p> + <p>{job.company.name}</p> <f:if condition="{job.task}"> <h3><f:translate key="frontend.task" /></h3> @@ -60,20 +61,24 @@ {job.contact.email} </p> </f:if> - - <h3><f:translate key="frontend.apply_by_mail" /></h3> - <p> - <f:for each="{job.company}" as="company">{company.name}</f:for><br> - {job.contact.firstName} {job.contact.lastName}<br> - <f:for each="{job.company}" as="company">{company.street}</f:for><br> - <f:for each="{job.company}" as="company">{company.city}</f:for><br> + <f:if condition="{job.contact.email} && !{job.contact.hideInFrontend}"> + <h3><f:translate key="frontend.apply_by_mail" /></h3> + <p> + {job.company.name} + <br> + {job.contact.firstName} {job.contact.lastName}<br> + {job.company.street} + <br> + {job.company.city} + <br> {job.contact.email}<br> {job.contact.phone} - </p> + </p> + </f:if> </div> <div class="pia-card-footer"> <f:link.action class="cta-link" pageUid="{settings.applyPage}" controller="Joblist" action="applyForm" - pluginName="JobApplication" arguments="{uid: job.uid}"> + pluginName="JobApplication" arguments="{uid: job.uid}"> <f:translate key="frontend.applyNow" /> </f:link.action> </div> diff --git a/Resources/Private/Templates/Joblist/ApplyForm.html b/Resources/Private/Templates/Joblist/ApplyForm.html index 05ced8d2dbd40986d412e70ce760e40b40e6ba74..d89c1b1589aa67c22e6ffd259dae18fef121cc79 100644 --- a/Resources/Private/Templates/Joblist/ApplyForm.html +++ b/Resources/Private/Templates/Joblist/ApplyForm.html @@ -21,6 +21,7 @@ <f:form.hidden property="job" value="{job}" /> <f:form.hidden property="jobId" value="{job.jobId}" /> <f:form.hidden property="jobTitle" value="{job.title}" /> + <f:form.hidden property="company" value="{job.company.uid}" /> </f:then> </f:if> <input type="hidden" name="tx_sgjobs_jobapplication[folderName]" value="{folderName}" /> @@ -51,6 +52,24 @@ </ul> </f:if> + <f:if condition="!{job}"> + <f:then> + <div class="form-group"> + <label for="apply-company"><f:translate key="frontend.apply.company" /></label> + <f:form.select class="form-control" property="company" id="apply-company" multiple="0" size="1" + optionValueField="uid" optionLabelField="city" options="{companies}" + /> + <f:form.validationResults for="applyData.location"> + <ul class="sg-jobs-validation-error parsley-errors-list filled"> + <f:for each="{validationResults.errors}" as="error"> + <li class="parsley-required">{error.message}</li> + </f:for> + </ul> + </f:form.validationResults> + </div> + </f:then> + </f:if> + <div class="form-group"> <label for="apply-gender"><f:translate key="frontend.apply.gender" /></label> <f:form.select property="gender" id="apply-gender" class="form-control" options="{Male: '{f:translate(key: \'frontend.apply.gender.male\')}', Female: '{f:translate(key: \'frontend.apply.gender.female\')}'}" /> diff --git a/composer.json b/composer.json index 5b527ab22e38613400b5371536386b5e4d097a5a..13e6f23f5a4fd2a2b67e4304a533905e99ed552e 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "license": [ "GPL-2.0+" ], - "version": "1.4.1", + "version": "1.5.0", "support": { "issues": "https://gitlab.sgalinski.de/typo3/sg_jobs" }, diff --git a/ext_emconf.php b/ext_emconf.php index b1e5f2fba9292f6003702c25f53892b0dc2b0b50..545e3373543aa59f3cda6494ac3d74f59eb126bd 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -4,7 +4,7 @@ $EM_CONF[$_EXTKEY] = array ( 'title' => 'Jobs', 'description' => 'Manage and display your Job offers.', 'category' => 'plugin', - 'version' => '1.4.1', + 'version' => '1.5.0', 'state' => 'stable', 'uploadfolder' => FALSE, 'createDirs' => '', diff --git a/ext_tables.sql b/ext_tables.sql index a8cb9c0c1181ba9b63625292af2c136cdc57d981..fcd79cc4e0834b3ed3b57fd115e024a7fd2b8c8d 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -58,6 +58,7 @@ CREATE TABLE tx_sgjobs_domain_model_company ( street varchar(255) DEFAULT '' NOT NULL, country varchar(255) DEFAULT '' NOT NULL, description text DEFAULT '' NOT NULL, + contact int(11) unsigned DEFAULT '0' NOT NULL, -- TYPO3 fields sorting int(11) unsigned DEFAULT '0' NOT NULL, @@ -99,11 +100,11 @@ CREATE TABLE tx_sgjobs_domain_model_contact ( -- Custom fields first_name varchar(255) DEFAULT '' NOT NULL, last_name varchar(255) DEFAULT '' NOT NULL, - company varchar(255) DEFAULT '' NOT NULL, city varchar(255) DEFAULT '' NOT NULL, zip varchar(255) DEFAULT '' NOT NULL, email varchar(255) DEFAULT '' NOT NULL, phone varchar(255) DEFAULT '' NOT NULL, + hide_in_frontend tinyint(4) unsigned DEFAULT '0' NOT NULL, -- TYPO3 fields sorting int(11) unsigned DEFAULT '0' NOT NULL, @@ -146,6 +147,7 @@ CREATE TABLE tx_sgjobs_domain_model_job_application ( job_id text DEFAULT '' NOT NULL, job int(11) unsigned DEFAULT '0' NOT NULL, job_title text DEFAULT '' NOT NULL, + company text DEFAULT '' NOT NULL, gender varchar(30) DEFAULT '' NOT NULL, first_name text DEFAULT '' NOT NULL, last_name text DEFAULT '' NOT NULL,