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

Merge branch 'master' of gitlab.sgalinski.de:typo3/sg_jobs

parents 6ee3e5b8 1d7f1ce6
No related branches found
No related tags found
No related merge requests found
......@@ -114,6 +114,18 @@ class JoblistController extends ActionController {
$mailService->setToAddresses($this->settings['applicationEmail']);
$mailService->sendEmail();
// redirect to the given page id from the flexform
$redirectPageId = (int) $this->configurationManager->getConfiguration(
ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK
)['settings']['redirectPage'];
$uriBuilder = $this->uriBuilder;
$uri = $uriBuilder
->setTargetPageUid($redirectPageId)
->build();
$this->redirectToUri($uri);
} catch (\Exception $exception) {
// possible errors, because of wrong mails (maybe log that somewhere? Does this makes sense?)
}
......
<?xml version="1.0" encoding="UTF-8"?>
<T3DataStructure>
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.plugin_options</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<settings.redirectPage>
<TCEforms>
<label>LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs.application_redirect_page</label>
<config>
<type>group</type>
<eval>required</eval>
<internal_type>db</internal_type>
<allowed>pages</allowed>
<size>1</size>
<maxitems>1</maxitems>
<minitems>0</minitems>
<show_thumbs>1</show_thumbs>
<wizards>
<suggest>
<type>suggest</type>
</suggest>
</wizards>
</config>
</TCEforms>
</settings.redirectPage>
</el>
</ROOT>
</sDEF>
</sheets>
</T3DataStructure>
\ No newline at end of file
<?php
call_user_func(function() {
$extensionName = strtolower(\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase('sg_jobs'));
$pluginSignature = $extensionName . '_' . strtolower('Joblist');
call_user_func(
function () {
$extensionName = strtolower(\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase('sg_jobs'));
$pluginSignature = $extensionName . '_' . strtolower('Joblist');
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:sg_jobs/Configuration/FlexForms/Joblist.xml'
);
});
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:sg_jobs/Configuration/FlexForms/Joblist.xml'
);
$pluginSignature = $extensionName . '_' . strtolower('JobApplication');
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:sg_jobs/Configuration/FlexForms/JobApplication.xml'
);
}
);
......@@ -17,6 +17,10 @@
<source>Qualification &amp; Tasks</source>
<target>Qualifikation &amp; Aufgaben</target>
</trans-unit>
<trans-unit id="tx_sgjobs.application_redirect_page" approved="yes">
<source>Redirect page after form submit</source>
<target>Weiterleitungsziel nach abschicken des Formulars</target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_base" approved="yes">
<source>Base Table</source>
<target>Basis-Tabelle</target>
......
......@@ -15,6 +15,9 @@
<trans-unit id="tca.qualification_tab">
<source>Qualification &amp; Tasks</source>
</trans-unit>
<trans-unit id="tx_sgjobs.application_redirect_page">
<source>Redirect page after form submit</source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_base">
<source>Base Table</source>
</trans-unit>
......
......@@ -2,14 +2,14 @@
<f:section name="main">
<f:form action="apply" controller="Joblist" method="post" objectName="applyData" object="{applyData}" enctype="multipart/form-data">
<f:form.hidden value="{job.uid}" property="jobId" />
<f:if condition="{job}">
<f:form.hidden value="{job.job_id}" property="jobId" />
<label for="apply-title"><f:translate key="frontend.apply.title" /></label>
<span id="apply-title">{job.title}</span>
<br />
</f:if>
<label for="apply-gender"><f:translate key="frontend.apply.gender" /></label>
<<<<<<< HEAD
<f:form.select property="gender" id="apply-gender" data="{}" class="" options="{Male: 'Male', Female: 'Female'}" />
=======
<f:form.select property="gender" id="apply-gender" class="" options="{None: '', Male: 'Male', Female: 'Female'}" />
>>>>>>> ef0bad6dbd9fd1503cfce001734cb83f277d8404
<f:form.validationResults for="applyData.gender">
<f:for each="{validationResults.errors}" as="error">
<div class="sg-jobs-validation-error">
......
module.exports = function() {
'use strict';
const $ = require('jquery');
let SgJobs = {};
SgJobs.init = function() {
$('body').delegate('.sgjobs-select', 'change', function() {
$.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);
});
});
};
return SgJobs;
};
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