Skip to content
Snippets Groups Projects
Commit aacfe2cd authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Remove Static info tables requirement

parent d1a7f7f1
No related branches found
Tags 4.7.4
1 merge request!12Feature upgrade to9 lts
...@@ -35,9 +35,11 @@ use SGalinski\SgJobs\Domain\Repository\JobRepository; ...@@ -35,9 +35,11 @@ use SGalinski\SgJobs\Domain\Repository\JobRepository;
use SGalinski\SgJobs\Property\TypeConverter\UploadedFileReferenceConverter; use SGalinski\SgJobs\Property\TypeConverter\UploadedFileReferenceConverter;
use SGalinski\SgJobs\Service\FrontendFilterService; use SGalinski\SgJobs\Service\FrontendFilterService;
use SGalinski\SgMail\Service\MailTemplateService; use SGalinski\SgMail\Service\MailTemplateService;
use SJBR\StaticInfoTables\Domain\Repository\CountryRepository; use SGalinski\SgJobs\Domain\Repository\CountryRepository;
use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface; use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException; use TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException;
...@@ -143,7 +145,7 @@ class JoblistController extends ActionController { ...@@ -143,7 +145,7 @@ class JoblistController extends ActionController {
} }
$GLOBALS['TSFE']->page['titlebyextension'] = $job->getTitle(); $GLOBALS['TSFE']->page['titlebyextension'] = $job->getTitle();
$GLOBALS['TSFE']->page['description'] = strip_tags(substr($job->getDescription(), 0, 200)); $GLOBALS['TSFE']->page['description'] = \strip_tags(\substr($job->getDescription(), 0, 200));
$GLOBALS['TSFE']->page['extensionArgumentsForCanonicalAndHrefLang'] = $GLOBALS['TSFE']->page['extensionArgumentsForCanonicalAndHrefLang'] =
'&tx_sgjobs_jobapplication[jobId]=' . $jobId; '&tx_sgjobs_jobapplication[jobId]=' . $jobId;
...@@ -165,7 +167,7 @@ class JoblistController extends ActionController { ...@@ -165,7 +167,7 @@ class JoblistController extends ActionController {
// get all jobs for the current page // get all jobs for the current page
$jobsCount = \count(FrontendFilterService::getJobs($filters)); $jobsCount = \count(FrontendFilterService::getJobs($filters));
$numberOfPages = ($jobLimit <= 0 ? 0 : ceil($jobsCount / $jobLimit)); $numberOfPages = ($jobLimit <= 0 ? 0 : \ceil($jobsCount / $jobLimit));
} }
$this->view->assign('jobs', $jobs); $this->view->assign('jobs', $jobs);
...@@ -182,6 +184,7 @@ class JoblistController extends ActionController { ...@@ -182,6 +184,7 @@ class JoblistController extends ActionController {
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException * @throws \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
* @throws \TYPO3\CMS\Core\Context\Exception\AspectNotFoundException
*/ */
public function applyFormAction(JobApplication $applyData = NULL, $error = NULL, $jobId = NULL) { public function applyFormAction(JobApplication $applyData = NULL, $error = NULL, $jobId = NULL) {
if ($error !== NULL && $error !== '') { if ($error !== NULL && $error !== '') {
...@@ -206,7 +209,7 @@ class JoblistController extends ActionController { ...@@ -206,7 +209,7 @@ class JoblistController extends ActionController {
} }
if ($folderName === NULL) { if ($folderName === NULL) {
$folderName = md5(uniqid('sgjobs-', TRUE)); $folderName = \md5(\uniqid('sgjobs-', TRUE));
$this->request->setArgument('folderName', $folderName); $this->request->setArgument('folderName', $folderName);
} }
$this->view->assign('folderName', $folderName); $this->view->assign('folderName', $folderName);
...@@ -218,7 +221,7 @@ class JoblistController extends ActionController { ...@@ -218,7 +221,7 @@ class JoblistController extends ActionController {
$job = $this->jobRepository->findByUidLocalized($jobId); $job = $this->jobRepository->findByUidLocalized($jobId);
if ($job) { if ($job) {
$GLOBALS['TSFE']->page['titlebyextension'] = $job->getTitle(); $GLOBALS['TSFE']->page['titlebyextension'] = $job->getTitle();
$GLOBALS['TSFE']->page['description'] = strip_tags(substr($job->getDescription(), 0, 200)); $GLOBALS['TSFE']->page['description'] = \strip_tags(\substr($job->getDescription(), 0, 200));
$GLOBALS['TSFE']->page['extensionArgumentsForCanonicalAndHrefLang'] = $GLOBALS['TSFE']->page['extensionArgumentsForCanonicalAndHrefLang'] =
'&tx_sgjobs_jobapplication[jobId]=' . $jobId; '&tx_sgjobs_jobapplication[jobId]=' . $jobId;
} }
...@@ -231,10 +234,17 @@ class JoblistController extends ActionController { ...@@ -231,10 +234,17 @@ class JoblistController extends ActionController {
} }
// display country options // display country options
if (\version_compare(VersionNumberUtility::getCurrentTypo3Version(), '9.0.0', '<')) {
$sysLanguageUid = $GLOBALS['TSFE']->sys_language_uid;
} else {
$context = GeneralUtility::makeInstance(Context::class);
$sysLanguageUid = $context->getPropertyFromAspect('language', 'id');
}
$countryRepository = $this->objectManager->get(CountryRepository::class); $countryRepository = $this->objectManager->get(CountryRepository::class);
$countries = $countryRepository->findAllOrderedBy('shortNameEn')->toArray(); $countries = $countryRepository->findAllOrderedByLanguage($GLOBALS['TSFE']->sys_language_isocode);
$this->view->assign('countries', $countries); $this->view->assign('countries', $countries);
$this->view->assign('sysLanguageUid', $GLOBALS['TSFE']->sys_language_uid); $this->view->assign('sysLanguageUid', $sysLanguageUid);
$allowedMimeTypes = $this->settings['allowedMimeTypes']; $allowedMimeTypes = $this->settings['allowedMimeTypes'];
$this->view->assign('allowedMimeTypes', $allowedMimeTypes); $this->view->assign('allowedMimeTypes', $allowedMimeTypes);
...@@ -309,7 +319,7 @@ class JoblistController extends ActionController { ...@@ -309,7 +319,7 @@ class JoblistController extends ActionController {
*/ */
private function submitApplicationFiles(JobApplication $applicationData, $folderName) { private function submitApplicationFiles(JobApplication $applicationData, $folderName) {
$resourceFactory = $this->objectManager->get(ResourceFactory::class); $resourceFactory = $this->objectManager->get(ResourceFactory::class);
$newName = date('Ymd-His') . '_' . $applicationData->getJobId() . '-' . $applicationData->getFirstName() $newName = \date('Ymd-His') . '_' . $applicationData->getJobId() . '-' . $applicationData->getFirstName()
. '-' . $applicationData->getLastName(); . '-' . $applicationData->getLastName();
$storage = $resourceFactory->getStorageObject(1); $storage = $resourceFactory->getStorageObject(1);
$applicationFilePath = PATH_site . $storage->getConfiguration()['basePath'] . 'JobApplication/' . $folderName . $applicationFilePath = PATH_site . $storage->getConfiguration()['basePath'] . 'JobApplication/' . $folderName .
...@@ -493,9 +503,9 @@ class JoblistController extends ActionController { ...@@ -493,9 +503,9 @@ class JoblistController extends ActionController {
try { try {
GeneralUtility::mkdir_deep(\dirname($filePath)); GeneralUtility::mkdir_deep(\dirname($filePath));
$file = fopen($filePath, 'wb+'); $file = \fopen($filePath, 'wb+');
fputcsv($file, $dataToInsertArr); \fputcsv($file, $dataToInsertArr);
fclose($file); \fclose($file);
} catch (\RuntimeException $exception) { } catch (\RuntimeException $exception) {
$this->redirect('applyForm', NULL, NULL, ['error' => $exception->getMessage()]); $this->redirect('applyForm', NULL, NULL, ['error' => $exception->getMessage()]);
} }
......
...@@ -27,12 +27,489 @@ namespace SGalinski\SgJobs\Domain\Model; ...@@ -27,12 +27,489 @@ namespace SGalinski\SgJobs\Domain\Model;
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
*/ */
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
/** /**
* Class Country * Model representing Countries
* *
* @package SGalinski\SgJobs\Domain\Model * @package SGalinski\SgJobs\Domain\Model
* @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de> * @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
*/ */
class Country { class Country extends AbstractEntity {
/**
* @var string
*/
protected $cnIso2;
/**
* @var string
*/
protected $cnIso3;
/**
* @var string
*/
protected $cnIsoNr;
/**
* @var string
*/
protected $cnParentTerritoryUid;
/**
* @var string
*/
protected $cnParentTrIsoNr;
/**
* @var string
*/
protected $cnOfficialNameLocal;
/**
* @var string
*/
protected $cnOfficialNameEn;
/**
* @var string
*/
protected $cnCapital;
/**
* @var string
*/
protected $cnTldomain;
/**
* @var string
*/
protected $cnCurrencyUid;
/**
* @var string
*/
protected $cnCurrencyIso3;
/**
* @var string
*/
protected $cnCurrencyIsoNr;
/**
* @var string
*/
protected $cnPhone;
/**
* @var string
*/
protected $cnEuMember;
/**
* @var string
*/
protected $cnUnoMember;
/**
* @var string
*/
protected $cnAddressFormat;
/**
* @var string
*/
protected $cnZoneFlag;
/**
* @var string
*/
protected $cnShortLocal;
/**
* @var string
*/
protected $cnShortEn;
/**
* @var string
*/
protected $cnShortDe;
/**
* @var string
*/
protected $cnShortEs;
/**
* @var string
*/
protected $cnShortIt;
/**
* @var string
*/
protected $cnShortFr;
/**
* @var string
*/
protected $cnCountryZones;
/**
* @return string
*/
public function getCnIso2(): string {
return $this->cnIso2;
}
/**
* @param string $cnIso2
*/
public function setCnIso2(string $cnIso2): void {
$this->cnIso2 = $cnIso2;
}
/**
* @return string
*/
public function getCnIso3(): string {
return $this->cnIso3;
}
/**
* @param string $cnIso3
*/
public function setCnIso3(string $cnIso3): void {
$this->cnIso3 = $cnIso3;
}
/**
* @return string
*/
public function getCnIsoNr(): string {
return $this->cnIsoNr;
}
/**
* @param string $cnIsoNr
*/
public function setCnIsoNr(string $cnIsoNr): void {
$this->cnIsoNr = $cnIsoNr;
}
/**
* @return string
*/
public function getCnParentTerritoryUid(): string {
return $this->cnParentTerritoryUid;
}
/**
* @param string $cnParentTerritoryUid
*/
public function setCnParentTerritoryUid(string $cnParentTerritoryUid): void {
$this->cnParentTerritoryUid = $cnParentTerritoryUid;
}
/**
* @return string
*/
public function getCnParentTrIsoNr(): string {
return $this->cnParentTrIsoNr;
}
/**
* @param string $cnParentTrIsoNr
*/
public function setCnParentTrIsoNr(string $cnParentTrIsoNr): void {
$this->cnParentTrIsoNr = $cnParentTrIsoNr;
}
/**
* @return string
*/
public function getCnOfficialNameLocal(): string {
return $this->cnOfficialNameLocal;
}
/**
* @param string $cnOfficialNameLocal
*/
public function setCnOfficialNameLocal(string $cnOfficialNameLocal): void {
$this->cnOfficialNameLocal = $cnOfficialNameLocal;
}
/**
* @return string
*/
public function getCnOfficialNameEn(): string {
return $this->cnOfficialNameEn;
}
/**
* @param string $cnOfficialNameEn
*/
public function setCnOfficialNameEn(string $cnOfficialNameEn): void {
$this->cnOfficialNameEn = $cnOfficialNameEn;
}
/**
* @return string
*/
public function getCnCapital(): string {
return $this->cnCapital;
}
/**
* @param string $cnCapital
*/
public function setCnCapital(string $cnCapital): void {
$this->cnCapital = $cnCapital;
}
/**
* @return string
*/
public function getCnTldomain(): string {
return $this->cnTldomain;
}
/**
* @param string $cnTldomain
*/
public function setCnTldomain(string $cnTldomain): void {
$this->cnTldomain = $cnTldomain;
}
/**
* @return string
*/
public function getCnCurrencyUid(): string {
return $this->cnCurrencyUid;
}
/**
* @param string $cnCurrencyUid
*/
public function setCnCurrencyUid(string $cnCurrencyUid): void {
$this->cnCurrencyUid = $cnCurrencyUid;
}
/**
* @return string
*/
public function getCnCurrencyIso3(): string {
return $this->cnCurrencyIso3;
}
/**
* @param string $cnCurrencyIso3
*/
public function setCnCurrencyIso3(string $cnCurrencyIso3): void {
$this->cnCurrencyIso3 = $cnCurrencyIso3;
}
/**
* @return string
*/
public function getCnCurrencyIsoNr(): string {
return $this->cnCurrencyIsoNr;
}
/**
* @param string $cnCurrencyIsoNr
*/
public function setCnCurrencyIsoNr(string $cnCurrencyIsoNr): void {
$this->cnCurrencyIsoNr = $cnCurrencyIsoNr;
}
/**
* @return string
*/
public function getCnPhone(): string {
return $this->cnPhone;
}
/**
* @param string $cnPhone
*/
public function setCnPhone(string $cnPhone): void {
$this->cnPhone = $cnPhone;
}
/**
* @return string
*/
public function getCnEuMember(): string {
return $this->cnEuMember;
}
/**
* @param string $cnEuMember
*/
public function setCnEuMember(string $cnEuMember): void {
$this->cnEuMember = $cnEuMember;
}
/**
* @return string
*/
public function getCnUnoMember(): string {
return $this->cnUnoMember;
}
/**
* @param string $cnUnoMember
*/
public function setCnUnoMember(string $cnUnoMember): void {
$this->cnUnoMember = $cnUnoMember;
}
/**
* @return string
*/
public function getCnAddressFormat(): string {
return $this->cnAddressFormat;
}
/**
* @param string $cnAddressFormat
*/
public function setCnAddressFormat(string $cnAddressFormat): void {
$this->cnAddressFormat = $cnAddressFormat;
}
/**
* @return string
*/
public function getCnZoneFlag(): string {
return $this->cnZoneFlag;
}
/**
* @param string $cnZoneFlag
*/
public function setCnZoneFlag(string $cnZoneFlag): void {
$this->cnZoneFlag = $cnZoneFlag;
}
/**
* @return string
*/
public function getCnShortLocal(): string {
return $this->cnShortLocal;
}
/**
* @param string $cnShortLocal
*/
public function setCnShortLocal(string $cnShortLocal): void {
$this->cnShortLocal = $cnShortLocal;
}
/**
* @return string
*/
public function getCnShortEn(): string {
return $this->cnShortEn;
}
/**
* @param string $cnShortEn
*/
public function setCnShortEn(string $cnShortEn): void {
$this->cnShortEn = $cnShortEn;
}
/**
* @return string
*/
public function getCnShortDe(): string {
return $this->cnShortDe;
}
/**
* @param string $cnShortDe
*/
public function setCnShortDe(string $cnShortDe): void {
$this->cnShortDe = $cnShortDe;
}
/**
* @return string
*/
public function getCnCountryZones(): string {
return $this->cnCountryZones;
}
/**
* @param string $cnCountryZones
*/
public function setCnCountryZones(string $cnCountryZones): void {
$this->cnCountryZones = $cnCountryZones;
}
/**
* @return string
*/
public function getCnShortEs(): string {
return $this->cnShortEs;
}
/**
* @param string $cnShortEs
*/
public function setCnShortEs(string $cnShortEs): void {
$this->cnShortEs = $cnShortEs;
}
/**
* @return string
*/
public function getCnShortIt(): string {
return $this->cnShortIt;
}
/**
* @param string $cnShortIt
*/
public function setCnShortIt(string $cnShortIt): void {
$this->cnShortIt = $cnShortIt;
}
/**
* @return string
*/
public function getCnShortFr(): string {
return $this->cnShortFr;
}
/**
* @param string $cnShortFr
*/
public function setCnShortFr(string $cnShortFr): void {
$this->cnShortFr = $cnShortFr;
}
/**
* Get the CnShort in the language of the frontend
*
* @return string
*/
public function getCnShort(): string {
if ($GLOBALS['TSFE']->sys_language_isocode === 'de') {
return $this->getCnShortDe();
}
if ($GLOBALS['TSFE']->sys_language_isocode === 'it') {
return $this->getCnShortIt();
}
if ($GLOBALS['TSFE']->sys_language_isocode === 'fr') {
return $this->getCnShortFr();
}
if ($GLOBALS['TSFE']->sys_language_isocode === 'es') {
return $this->getCnShortEs();
}
return $this->getCnShortEn();
}
} }
<?php <?php
namespace SGalinski\SgJobs\Domain\Model; namespace SGalinski\SgJobs\Domain\Repository;
/** /**
* *
...@@ -27,12 +27,69 @@ namespace SGalinski\SgJobs\Domain\Model; ...@@ -27,12 +27,69 @@ namespace SGalinski\SgJobs\Domain\Model;
* This copyright notice MUST APPEAR in all copies of the script! * This copyright notice MUST APPEAR in all copies of the script!
*/ */
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
use TYPO3\CMS\Extbase\Persistence\QueryResultInterface;
use TYPO3\CMS\Extbase\Persistence\Repository;
/** /**
* Class Language * Repository class to get Countries
* *
* @package SGalinski\SgJobs\Domain\Model * @package SGalinski\SgJobs\Domain\Repository
* @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de> * @author Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
*/ */
class Language { class CountryRepository extends Repository {
/**
* Initialize the CountryRepository and set the storage page settings
*/
public function initializeObject() {
$defaultQuerySettings = $this->objectManager->get(Typo3QuerySettings::class);
$defaultQuerySettings->setRespectStoragePage(FALSE);
$this->defaultQuerySettings = $defaultQuerySettings;
}
/**
* Find all countries ordered by the given language
*
* @param string $language
* @return QueryResultInterface
*/
public function findAllOrderedByLanguage(string $language): QueryResultInterface {
$query = $this->createQuery();
$query->setOrderings(
[
'cnShortEn' => QueryInterface::ORDER_ASCENDING
]
);
if ($language === 'de') {
$query->setOrderings(
[
'cnShortDe' => QueryInterface::ORDER_ASCENDING
]
);
}
if ($language === 'it') {
$query->setOrderings(
[
'cnShortIt' => QueryInterface::ORDER_ASCENDING
]
);
}
if ($language === 'fr') {
$query->setOrderings(
[
'cnShortFr' => QueryInterface::ORDER_ASCENDING
]
);
}
if ($language === 'es') {
$query->setOrderings(
[
'cnShortEs' => QueryInterface::ORDER_ASCENDING
]
);
}
return $query->execute();
}
} }
<?php
namespace SGalinski\SgJobs\Service;
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
use SJBR\StaticInfoTables\Domain\Model\Country;
use SJBR\StaticInfoTables\Domain\Repository\CountryRepository;
use SJBR\StaticInfoTables\Hook\Backend\Form\FormDataProvider\TcaSelectItemsProcessor;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
/**
* Class TcaItemsProcessor
*
* @package SGalinski\SgJobs\Service
*/
class TcaItemsProcessor extends TcaSelectItemsProcessor {
/**
* returns the country options from static info tables
*
* @param array $PA
* @throws \InvalidArgumentException
*/
public function getCountryOptions(array $PA) {
$items = $PA['items'];
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var CountryRepository $countryRepository */
$countryRepository = $objectManager->get(CountryRepository::class);
$objects = $countryRepository->findAllOrderedBy('shortNameEn')->toArray();
// Index rows by uid
$uidIndexedObjects = [];
if (!empty($objects)) {
/** @var Country $object */
foreach ($objects as $object) {
$uidIndexedObjects[$object->getUid()] = $object;
$items[] = [$object->getShortNameEn(), $object->getUid()];
}
}
$items = $this->translateSelectorItems($items, 'static_countries');
if (\count($items) > 1) {
foreach ($items as $key => $item) {
$object = NULL;
if ($item[1] && $object = $uidIndexedObjects[$item[1]]) {
$items[$key][1] = $object->getIsoCodeA3();
}
}
}
$PA['items'] = $items;
}
}
...@@ -30,7 +30,7 @@ return call_user_func( ...@@ -30,7 +30,7 @@ return call_user_func(
return [ return [
'ctrl' => [ 'ctrl' => [
'title' => $ll, 'title' => $ll,
'label' => 'cn_iso_2', 'label' => 'cn_official_name_en',
'iconfile' => 'EXT:' . $extKey . '/Resources/Public/Icons/' . $table . '.svg', 'iconfile' => 'EXT:' . $extKey . '/Resources/Public/Icons/' . $table . '.svg',
'sortby' => 'sorting', 'sortby' => 'sorting',
'tstamp' => 'tstamp', 'tstamp' => 'tstamp',
......
<?php
/**
*
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
*/
return call_user_func(
function ($extKey, $table) {
$ll = 'LLL:EXT:' . $extKey . '/Resources/Private/Language/locallang_db.xlf:' . $table;
return [
'ctrl' => [
'title' => $ll,
'label' => 'lg_iso_2',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'delete' => 'deleted',
'versioningWS' => FALSE,
'enablecolumns' => [],
'searchFields' => '',
],
'types' => [
'0' => [
'showitem' => 'lg_iso_2, lg_name_local, lg_name_en, lg_name_de, lg_typo3, lg_country_iso_2, lg_collate_locale, lg_sacred, lg_constructed'
]
],
'palettes' => [
],
'interface' => [
'showRecordFieldList' => 'lg_iso_2, lg_name_local, lg_name_en, lg_name_de, lg_typo3, lg_country_iso_2, lg_collate_locale, lg_sacred, lg_constructed'
],
'columns' => [
'lg_iso_2' => [
'exclude' => FALSE,
'label' => $ll . '.lg_iso_2',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_name_local' => [
'exclude' => FALSE,
'label' => $ll . '.lg_name_local',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_name_en' => [
'exclude' => FALSE,
'label' => $ll . '.lg_name_en',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_name_de' => [
'exclude' => FALSE,
'label' => $ll . '.lg_name_de',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_typo3' => [
'exclude' => FALSE,
'label' => $ll . '.lg_typo3',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_country_iso_2' => [
'exclude' => FALSE,
'label' => $ll . '.lg_country_iso_2',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_collate_locale' => [
'exclude' => FALSE,
'label' => $ll . '.lg_collate_locale',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_sacred' => [
'exclude' => FALSE,
'label' => $ll . '.lg_sacred',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
],
'lg_constructed' => [
'exclude' => FALSE,
'label' => $ll . '.lg_constructed',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
]
]
]
];
}, 'sg_jobs', 'tx_sgjobs_domain_model_language'
);
...@@ -8,32 +8,54 @@ ...@@ -8,32 +8,54 @@
<label for="filter-countries"> <label for="filter-countries">
<f:translate key="frontend.filter.countries"/> <f:translate key="frontend.filter.countries"/>
</label> </label>
<f:form.select class="sgjobs-select form-control" multiple="0" size="1" value="{selectedCountry}" <f:form.select
property="filterCountry" optionValueField="value" options="{countries}" class="sgjobs-select form-control"
id="filter-countries"/> size="1"
value="{selectedCountry}"
property="filterCountry"
optionValueField="value"
options="{countries}"
id="filter-countries" />
</div> </div>
<div class="sgjobs-filter-bar-form-control"> <div class="sgjobs-filter-bar-form-control">
<label for="filter-countries"> <label for="filter-countries">
<f:translate key="frontend.filter.locations"/> <f:translate key="frontend.filter.locations"/>
</label> </label>
<f:form.select class="sgjobs-select form-control" multiple="0" size="1" value="{selectedLocation}" <f:form.select
property="filterLocation" optionValueField="value" options="{companies}" class="sgjobs-select form-control"
id="filter-locations"/> size="1"
value="{selectedLocation}"
property="filterLocation"
optionValueField="value"
options="{companies}"
id="filter-locations" />
</div> </div>
<div class="sgjobs-filter-bar-form-control"> <div class="sgjobs-filter-bar-form-control">
<label for="filter-companies"> <label for="filter-companies">
<f:translate key="frontend.filter.companies"/> <f:translate key="frontend.filter.companies"/>
</label> </label>
<f:form.select class="sgjobs-select form-control" multiple="0" size="1" value="{selectedCompany}" <f:form.select
property="filterCompany" optionValueField="value" options="{companies}" class="sgjobs-select form-control"
id="filter-companies"/> size="1"
value="{selectedCompany}"
property="filterCompany"
optionValueField="value"
options="{companies}"
id="filter-companies" />
</div> </div>
<div class="sgjobs-filter-bar-form-control"> <div class="sgjobs-filter-bar-form-control">
<label for="filter-departments"> <label for="filter-departments">
<f:translate key="frontend.filter.departments"/> <f:translate key="frontend.filter.departments"/>
</label> </label>
<f:form.select class="sgjobs-select form-control" multiple="0" size="1" value="{selectedDepartment}" <f:form.select
property="filterDepartment" optionValueField="value" options="{departments}" id="filter-departments"/> class="sgjobs-select form-control"
size="1"
value="{selectedDepartment}"
property="filterDepartment"
optionLabelField="title"
optionValueField="uid"
options="{departments}"
id="filter-departments" />
</div> </div>
</div> </div>
</f:form> </f:form>
......
...@@ -149,8 +149,8 @@ ...@@ -149,8 +149,8 @@
id="apply-country" id="apply-country"
class="form-control" class="form-control"
options="{countries}" options="{countries}"
optionLabelField="{f:if(condition: '{sysLanguageUid} == 0', then: 'shortNameDe', else: 'shortNameEn')}" optionLabelField="cnShort"
optionValueField="{f:if(condition: '{sysLanguageUid} == 0', then: 'shortNameDe', else: 'shortNameEn')}" optionValueField="cnShort"
prependOptionLabel="{f:translate(key:'frontend.apply.country.empty')}" /> prependOptionLabel="{f:translate(key:'frontend.apply.country.empty')}" />
<f:form.validationResults for="applyData.country"> <f:form.validationResults for="applyData.country">
<ul class="sg-jobs-validation-error parsley-errors-list filled"> <ul class="sg-jobs-validation-error parsley-errors-list filled">
...@@ -167,8 +167,8 @@ ...@@ -167,8 +167,8 @@
id="apply-nationality" id="apply-nationality"
class="form-control" class="form-control"
options="{countries}" options="{countries}"
optionLabelField="{f:if(condition: '{sysLanguageUid} == 0', then: 'shortNameDe', else: 'shortNameEn')}" optionLabelField="cnShort"
optionValueField="{f:if(condition: '{sysLanguageUid} == 0', then: 'shortNameDe', else: 'shortNameEn')}" optionValueField="cnShort"
prependOptionLabel="{f:translate(key:'frontend.apply.nationality.empty')}" /> prependOptionLabel="{f:translate(key:'frontend.apply.nationality.empty')}" />
<f:form.validationResults for="applyData.nationality"> <f:form.validationResults for="applyData.nationality">
<ul class="sg-jobs-validation-error parsley-errors-list filled"> <ul class="sg-jobs-validation-error parsley-errors-list filled">
......
...@@ -276,29 +276,9 @@ CREATE TABLE tx_sgjobs_domain_model_country ( ...@@ -276,29 +276,9 @@ CREATE TABLE tx_sgjobs_domain_model_country (
cn_short_local varchar(70) DEFAULT '' NOT NULL, cn_short_local varchar(70) DEFAULT '' NOT NULL,
cn_short_en varchar(50) DEFAULT '' NOT NULL, cn_short_en varchar(50) DEFAULT '' NOT NULL,
cn_country_zones int(11) DEFAULT '0' NOT NULL, cn_country_zones int(11) DEFAULT '0' NOT NULL,
cn_short_de varchar(50) DEFAULT '' NOT NULL cn_short_de varchar(50) DEFAULT '' NOT NULL,
cn_short_es varchar(50) DEFAULT '' NOT NULL,
cn_short_fr varchar(50) DEFAULT '' NOT NULL,
cn_short_it varchar(50) DEFAULT '' NOT NULL,
PRIMARY KEY (uid) PRIMARY KEY (uid)
); );
#
# Table structure for table "tx_sgjobs_domain_model_language"
#
CREATE TABLE tx_sgjobs_domain_model_language (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
deleted smallint(6) DEFAULT '0' NOT NULL,
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
lg_iso_2 varchar(2) DEFAULT '' NOT NULL,
lg_name_local varchar(99) DEFAULT '' NOT NULL,
lg_name_en varchar(50) DEFAULT '' NOT NULL,
lg_typo3 varchar(2) DEFAULT '' NOT NULL,
lg_country_iso_2 varchar(2) DEFAULT '' NOT NULL,
lg_collate_locale varchar(5) DEFAULT '' NOT NULL,
lg_sacred smallint(6) DEFAULT '0' NOT NULL,
lg_constructed smallint(6) DEFAULT '0' NOT NULL,
lg_name_de varchar(50) DEFAULT '' NOT NULL
PRIMARY KEY (uid),
KEY parent (pid)
);
This diff is collapsed.
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