diff --git a/Classes/Domain/Model/JobApplication.php b/Classes/Domain/Model/JobApplication.php index 82b6d27cbc14f354b1fb3d02f84338b1d45c0eaa..48bf133eeaefbc551fa1142af1a2acf0990b5caf 100644 --- a/Classes/Domain/Model/JobApplication.php +++ b/Classes/Domain/Model/JobApplication.php @@ -35,9 +35,12 @@ use TYPO3\CMS\Extbase\Persistence\ObjectStorage; class JobApplication extends AbstractEntity { /** - * @var \SGalinski\SgJobs\Domain\Model\Job $job + * this is a sharepoint id. nothing from the db + * + * @var string $jobId + * @validate NotEmpty */ - protected $job = ''; + protected $jobId = ''; /** * @var string $gender @@ -141,17 +144,17 @@ class JobApplication extends AbstractEntity { } /** - * @return \SGalinski\SgJobs\Domain\Model\Job + * @return string */ - public function getJob() { - return $this->job; + public function getJobId() { + return $this->jobId; } /** - * @param \SGalinski\SgJobs\Domain\Model\Job $job + * @param string $jobId */ - public function setJob(Job $job) { - $this->job = $job; + public function setJob($jobId) { + $this->jobId = $jobId; } /** diff --git a/Configuration/TCA/tx_sgjobs_domain_model_job_application.php b/Configuration/TCA/tx_sgjobs_domain_model_job_application.php index 454097455264efe30c82a97e8fe2a49b09fbe56f..40cdb3abc60b40d54bb7f8af5d8ff53fc986f515 100644 --- a/Configuration/TCA/tx_sgjobs_domain_model_job_application.php +++ b/Configuration/TCA/tx_sgjobs_domain_model_job_application.php @@ -32,7 +32,7 @@ return [ 'types' => [ '1' => [ 'showitem' => '--palette--;;sysLanguageAndHidden,job_id, gender, first_name, last_name, street, city, zip, - country, nationality, education, birth_date, phone, mobile, email, message, cover_letter, certificates, cv, + country, nationality, education, birth_date, phone, mobile, email, message, cover_letter, cv, certificates, div;;richtext[*]:rte_transform[mode=ts], --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime', ], @@ -124,27 +124,14 @@ return [ ], ], ], - 'job' => [ + 'job_id' => [ 'exclude' => 0, 'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job_application.job', 'config' => [ - 'type' => 'select', - 'eval' => 'required', - 'renderType' => 'selectSingle', - 'internal_type' => 'db', - 'foreign_table' => 'tx_sgjobs_domain_model_job', - 'size' => 1, - 'maxitems' => 1, - 'multiple' => 0, - 'fieldControl' => [ - 'editPopup' => [ - 'disabled' => FALSE, - ], - 'addRecord' => [ - 'disabled' => FALSE, - ] - ], - ] + 'type' => 'input', + 'size' => 30, + 'eval' => 'trim, required' + ], ], 'gender' => [ 'exclude' => 0, diff --git a/ext_tables.sql b/ext_tables.sql index 683d4cb711df42c87e6d2c08c56083129565d59a..63c423dde630ed36314e0061e30dd30dc63bfdf5 100644 --- a/ext_tables.sql +++ b/ext_tables.sql @@ -143,7 +143,7 @@ CREATE TABLE tx_sgjobs_domain_model_job_application ( pid int(11) DEFAULT '0' NOT NULL, -- Custom fields - job int(11) unsigned DEFAULT '0' NOT NULL, + job_id text DEFAULT '' NOT NULL, gender varchar(30) DEFAULT '' NOT NULL, first_name text DEFAULT '' NOT NULL, last_name text DEFAULT '' NOT NULL,