Skip to content
Snippets Groups Projects
Commit 74ea7cb2 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Fixing hide apply by fieldss

parent 41fb5fa5
No related branches found
No related tags found
No related merge requests found
......@@ -65,12 +65,12 @@ class Job extends AbstractEntity {
/**
* @var bool
*/
protected $applyByEmail = TRUE;
protected $hideApplyByEmail = TRUE;
/**
* @var bool
*/
protected $applyByPostal = TRUE;
protected $hideApplyByPostal = TRUE;
/**
* @var string $alternativeStartDate
......@@ -254,28 +254,28 @@ class Job extends AbstractEntity {
/**
* @return bool
*/
public function isApplyByEmail() {
return $this->applyByEmail;
public function isHideApplyByEmail() {
return $this->hideApplyByEmail;
}
/**
* @param bool $applyByEmail
* @param bool $hideApplyByEmail
*/
public function setApplyByEmail($applyByEmail) {
$this->applyByEmail = (boolean) $applyByEmail;
public function setHideApplyByEmail($hideApplyByEmail) {
$this->hideApplyByEmail = (boolean) $hideApplyByEmail;
}
/**
* @return bool
*/
public function isApplyByPostal() {
return $this->applyByPostal;
public function isHideApplyByPostal() {
return $this->hideApplyByPostal;
}
/**
* @param bool $applyByPostal
* @param bool $hideApplyByPostal
*/
public function setApplyByPostal($applyByPostal) {
$this->applyByPostal = (boolean) $applyByPostal;
public function setHideApplyByPostal($hideApplyByPostal) {
$this->hideApplyByPostal = (boolean) $hideApplyByPostal;
}
}
......@@ -26,7 +26,7 @@ return [
'Resources/Public/Icons/tx_sgjobs_domain_model_job.svg'
],
'interface' => [
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, job_id, area, apply_by_email, apply_by_postal, featured_offer, start_date, alternative_start_date,
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, pid, title, job_id, area, hide_apply_by_email, hide_apply_by_postal, featured_offer, start_date, alternative_start_date,
company, task, qualification, description, contact',
],
'types' => [
......@@ -42,7 +42,7 @@ return [
'canNotCollapse' => 1,
],
'palette_title_start' => ['showitem' => 'start_date, alternative_start_date', 'canNotCollapse' => 1],
'palette_apply_function' => ['showitem' => 'apply_by_email, apply_by_postal', 'canNotCollapse' => 1],
'palette_apply_function' => ['showitem' => 'hide_apply_by_email, hide_apply_by_postal', 'canNotCollapse' => 1],
'palette_area_function' => ['showitem' => 'area, featured_offer', 'canNotCollapse' => 1],
'palette_location_contact' => ['showitem' => 'company, contact', 'canNotCollapse' => 1]
],
......@@ -161,16 +161,16 @@ return [
'type' => 'check',
],
],
'apply_by_email' => [
'hide_apply_by_email' => [
'exclude' => 1,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.applyByEmail',
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.hideApplyByEmail',
'config' => [
'type' => 'check',
],
],
'apply_by_postal' => [
'hide_apply_by_postal' => [
'exclude' => 1,
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.applyByPostal',
'label' => 'LLL:EXT:sg_jobs/Resources/Private/Language/locallang_db.xlf:tx_sgjobs_domain_model_job.hideApplyByPostal',
'config' => [
'type' => 'check',
],
......
......@@ -169,6 +169,14 @@
<source><![CDATA[Featured Offer (will show up in the job offer teaser)]]></source>
<target><![CDATA[Diese Stellenausschreibung im Job-Teaser anzeigen]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.hideApplyByEmail" approved="yes">
<source><![CDATA[Hide apply by email]]></source>
<target><![CDATA[Bewerben per E-Mail ausblenden]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.hideApplyByPostal" approved="yes">
<source><![CDATA[Hide apply by postal]]></source>
<target><![CDATA[Bewerben per Post ausblenden]]></target>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.jobId" approved="yes">
<source><![CDATA[Job ID (optional)]]></source>
<target><![CDATA[Job ID (optional)]]></target>
......
......@@ -132,6 +132,12 @@
<trans-unit id="tx_sgjobs_domain_model_job.featuredOffer">
<source><![CDATA[Featured Offer (will show up in the job offer teaser)]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.hideApplyByEmail">
<source><![CDATA[Hide apply by email]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.hideApplyByPostal">
<source><![CDATA[Hide apply by postal]]></source>
</trans-unit>
<trans-unit id="tx_sgjobs_domain_model_job.jobId">
<source><![CDATA[Job ID (optional)]]></source>
</trans-unit>
......
......@@ -55,7 +55,7 @@
<f:format.html parseFuncTSPath="lib.parseFunc_RTE">{job.description}</f:format.html>
</f:if>
<f:if condition="{job.applyByEmail}">
<f:if condition="!{job.hideApplyByEmail}">
<f:if condition="{job.contact.email}">
<h3><f:translate key="frontend.email" /></h3>
<p>
......@@ -64,7 +64,7 @@
</f:if>
</f:if>
<f:if condition="{job.applyByPostal}">
<f:if condition="!{job.hideApplyByPostal}">
<f:if condition="{job.contact.email} && !{job.contact.hideContactInformation}">
<h3><f:translate key="frontend.apply_by_mail" /></h3>
<p>
......
......@@ -14,8 +14,8 @@ CREATE TABLE tx_sgjobs_domain_model_job (
area text DEFAULT '' NOT NULL,
contact int(11) unsigned DEFAULT '0' NOT NULL,
featured_offer tinyint(4) unsigned DEFAULT '0' NOT NULL,
apply_by_email tinyint(4) unsigned DEFAULT '1' NOT NULL,
apply_by_postal tinyint(4) unsigned DEFAULT '1' NOT NULL,
hide_apply_by_email tinyint(4) unsigned DEFAULT '0' NOT NULL,
hide_apply_by_postal tinyint(4) unsigned DEFAULT '0' NOT NULL,
-- TYPO3 fields
sorting int(11) unsigned DEFAULT '0' NOT NULL,
......
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