weiterleitung für deaktive Stellen deaktivieren
This commit is contained in:
parent
7dd83a0b4b
commit
2b175ffba1
|
@ -54,7 +54,8 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id'];
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id'];
|
||||||
if ($this->DreamjobJobOpening->save()) {
|
if ($this->DreamjobJobOpening->save()) {
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.add'), 'flash', array('alert' => 'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.add'), 'flash', array('alert' => 'success'));
|
||||||
return $this->redirect(array('action' => 'openingGet','id'=>$this->DreamjobJobOpening->id));
|
if($this->request->data['DreamjobJobOpening']['active'] and $this->request->data['DreamjobJobOpening']['startdate'] <= date("Y-m-d") and $this->request->data['DreamjobJobOpening']['enddate'] >= date("Y-m-d", strtotime("+1 day") ) )
|
||||||
|
return $this->redirect(array('action' => 'openingGet','id'=>$this->DreamjobJobOpening->id));
|
||||||
} else {
|
} else {
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
||||||
}
|
}
|
||||||
|
@ -92,7 +93,8 @@ class JobController extends AppController {
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $cid;
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $cid;
|
||||||
if ($this->DreamjobJobOpening->save($this->DreamjobJobOpening->data)) {
|
if ($this->DreamjobJobOpening->save($this->DreamjobJobOpening->data)) {
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save'), 'flash', array('alert' => 'success'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save'), 'flash', array('alert' => 'success'));
|
||||||
return $this->redirect(array('action' => 'openingGet','id'=>$this->request->params['id']));
|
if($this->request->data['DreamjobJobOpening']['active'] and $this->request->data['DreamjobJobOpening']['startdate'] <= date("Y-m-d") and $this->request->data['DreamjobJobOpening']['enddate'] >= date("Y-m-d", strtotime("+1 day") ) )
|
||||||
|
return $this->redirect(array('action' => 'openingGet','id'=>$this->request->params['id']));
|
||||||
} else
|
} else
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue