#169 Checkboxen AGB und Preise
This commit is contained in:
parent
2dc285388c
commit
4e4c12ac85
|
@ -60,19 +60,29 @@ class JobController extends AppController {
|
||||||
$c = $this->MiconwareSession->getCompany();
|
$c = $this->MiconwareSession->getCompany();
|
||||||
if (!empty($c)) {
|
if (!empty($c)) {
|
||||||
if ($this->request->is('post')) {
|
if ($this->request->is('post')) {
|
||||||
$this->DreamjobJobOpening->create($this->request->data);
|
if ($this->request->data['DreamjobJobOpening']['agb']) {
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id'];
|
unset($this->request->data['DreamjobJobOpening']['agb']);
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'],3);
|
if ($this->request->data['DreamjobJobOpening']['cost']) {
|
||||||
$this->request->data['DreamjobJobOpening']['enddate'] = $this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'];
|
unset($this->request->data['DreamjobJobOpening']['cost']);
|
||||||
if ($this->DreamjobJobOpening->save()) {
|
$this->DreamjobJobOpening->create($this->request->data);
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.success'), 'flash', array('alert' => 'success'));
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['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") ) )
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'],3);
|
||||||
return $this->redirect(array('action' => 'openingGet','id'=>$this->DreamjobJobOpening->id));
|
$this->request->data['DreamjobJobOpening']['enddate'] = $this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'];
|
||||||
$this->request->data=array();
|
if ($this->DreamjobJobOpening->save()) {
|
||||||
$this->request->data['DreamjobJobOpening']['active']=true;
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.success'), 'flash', array('alert' => 'success'));
|
||||||
$this->request->data['DreamjobJobOpening']['company_id']=$c['AppUser']['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") ) )
|
||||||
} else {
|
return $this->redirect(array('action' => 'openingGet','id'=>$this->DreamjobJobOpening->id));
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
$this->request->data=array();
|
||||||
|
$this->request->data['DreamjobJobOpening']['active']=true;
|
||||||
|
$this->request->data['DreamjobJobOpening']['company_id']=$c['AppUser']['id'];
|
||||||
|
} else {
|
||||||
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$this->MiconwareSession->setFlash(__('dreamjob.cost.error.notAccept'), 'flash', array('alert' => 'danger'));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'), 'flash', array('alert' => 'danger'));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.cost'), 'flash', array('alert' => 'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.cost'), 'flash', array('alert' => 'danger'));
|
||||||
|
@ -113,29 +123,39 @@ class JobController extends AppController {
|
||||||
$enddate_no = ($load['DreamjobJobOpening']['startdate']<=date("Y-m-d",strtotime("-1 day")));
|
$enddate_no = ($load['DreamjobJobOpening']['startdate']<=date("Y-m-d",strtotime("-1 day")));
|
||||||
$this->set('enddate_no',$enddate_no);
|
$this->set('enddate_no',$enddate_no);
|
||||||
if ($this->request->is(array('post', 'put'))) {
|
if ($this->request->is(array('post', 'put'))) {
|
||||||
$addToEnddate = !empty($this->request->data['DreamjobJobOpening']['addToEnddate']);
|
if ($this->request->data['DreamjobJobOpening']['agb']) {
|
||||||
$this->DreamjobJobOpening->create($this->request->data);
|
unset($this->request->data['DreamjobJobOpening']['agb']);
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['id'] = $this->request->params['id'];
|
if ($this->request->data['DreamjobJobOpening']['cost']) {
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $cid;
|
unset($this->request->data['DreamjobJobOpening']['cost']);
|
||||||
if($enddate_no){
|
$addToEnddate = !empty($this->request->data['DreamjobJobOpening']['addToEnddate']);
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'] = $load['DreamjobJobOpening']['startdate'];
|
$this->DreamjobJobOpening->create($this->request->data);
|
||||||
if($addToEnddate)
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['id'] = $this->request->params['id'];
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($load['DreamjobJobOpening']['enddate'],1);
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $cid;
|
||||||
else
|
if($enddate_no){
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = $load['DreamjobJobOpening']['enddate'];
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'] = $load['DreamjobJobOpening']['startdate'];
|
||||||
|
if($addToEnddate)
|
||||||
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($load['DreamjobJobOpening']['enddate'],1);
|
||||||
|
else
|
||||||
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = $load['DreamjobJobOpening']['enddate'];
|
||||||
|
}else{
|
||||||
|
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'],3);
|
||||||
|
$this->request->data['DreamjobJobOpening']['startdate'] = $this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'];
|
||||||
|
}
|
||||||
|
if ($this->DreamjobJobOpening->save($this->DreamjobJobOpening->data)) {
|
||||||
|
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']));
|
||||||
|
$load = $this->DreamjobJobOpening->findById($this->request->params['id']);
|
||||||
|
$enddate_no = ($load['DreamjobJobOpening']['startdate']<=date("Y-m-d",strtotime("-1 day")));
|
||||||
|
$this->set('enddate_no',$enddate_no);
|
||||||
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.success'), 'flash', array('alert' => 'success'));
|
||||||
|
} else
|
||||||
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
||||||
|
}else{
|
||||||
|
$this->MiconwareSession->setFlash(__('dreamjob.cost.error.notAccept'), 'flash', array('alert' => 'danger'));
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'],3);
|
$this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'), 'flash', array('alert' => 'danger'));
|
||||||
$this->request->data['DreamjobJobOpening']['startdate'] = $this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'];
|
|
||||||
}
|
}
|
||||||
if ($this->DreamjobJobOpening->save($this->DreamjobJobOpening->data)) {
|
|
||||||
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']));
|
|
||||||
$load = $this->DreamjobJobOpening->findById($this->request->params['id']);
|
|
||||||
$enddate_no = ($load['DreamjobJobOpening']['startdate']<=date("Y-m-d",strtotime("-1 day")));
|
|
||||||
$this->set('enddate_no',$enddate_no);
|
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.success'), 'flash', array('alert' => 'success'));
|
|
||||||
} else
|
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger'));
|
|
||||||
}else{
|
}else{
|
||||||
$this->MiconwareSession->setFlash(__('dreamjob.opening.cost'), 'flash', array('alert' => 'danger'));
|
$this->MiconwareSession->setFlash(__('dreamjob.opening.cost'), 'flash', array('alert' => 'danger'));
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,6 +99,10 @@ msgstr ""
|
||||||
msgid "dreamjob.agb"
|
msgid "dreamjob.agb"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: View/Registration/worker.ctp:41
|
||||||
|
msgid "dreamjob.cost"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: Controller/HomeController.php:123
|
#: Controller/HomeController.php:123
|
||||||
#: View/Elements/job_opening_head_extra.ctp:16
|
#: View/Elements/job_opening_head_extra.ctp:16
|
||||||
#: View/Registration/company.ctp:19
|
#: View/Registration/company.ctp:19
|
||||||
|
@ -189,6 +193,11 @@ msgstr ""
|
||||||
msgid "dreamjob.agb.error.notAccept"
|
msgid "dreamjob.agb.error.notAccept"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: Controller/JobController.php:357
|
||||||
|
#: Controller/RegistrationController.php:66;125
|
||||||
|
msgid "dreamjob.cost.error.notAccept"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: Controller/JobController.php:365
|
#: Controller/JobController.php:365
|
||||||
msgid "dreamjob.error.noWorker.title"
|
msgid "dreamjob.error.noWorker.title"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -777,6 +786,10 @@ msgstr ""
|
||||||
msgid "dreamjob.agb.accept"
|
msgid "dreamjob.agb.accept"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: View/Registration/worker.ctp:41
|
||||||
|
msgid "dreamjob.cost.accept"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: View/Job/application_send.ctp:46
|
#: View/Job/application_send.ctp:46
|
||||||
msgid "dreamjob.application.send"
|
msgid "dreamjob.application.send"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
Binary file not shown.
|
@ -86,6 +86,9 @@ msgstr "Impressum"
|
||||||
msgid "dreamjob.agb"
|
msgid "dreamjob.agb"
|
||||||
msgstr "AGBs"
|
msgstr "AGBs"
|
||||||
|
|
||||||
|
msgid "dreamjob.cost"
|
||||||
|
msgstr "Kosten"
|
||||||
|
|
||||||
#: Controller/HomeController.php:123
|
#: Controller/HomeController.php:123
|
||||||
#: View/Elements/job_opening_head_extra.ctp:16
|
#: View/Elements/job_opening_head_extra.ctp:16
|
||||||
#: View/Registration/company.ctp:19 View/User/settings_account.ctp:67
|
#: View/Registration/company.ctp:19 View/User/settings_account.ctp:67
|
||||||
|
@ -175,6 +178,11 @@ msgstr "Bewerbung konnte nicht versendet werden"
|
||||||
msgid "dreamjob.agb.error.notAccept"
|
msgid "dreamjob.agb.error.notAccept"
|
||||||
msgstr "AGBs wurde nicht akzeptiert "
|
msgstr "AGBs wurde nicht akzeptiert "
|
||||||
|
|
||||||
|
#: Controller/JobController.php:357
|
||||||
|
#: Controller/RegistrationController.php:66;125
|
||||||
|
msgid "dreamjob.cost.error.notAccept"
|
||||||
|
msgstr "Bitte akzeptieren sie unsere aktuelle Kosten!"
|
||||||
|
|
||||||
#: Controller/JobController.php:365
|
#: Controller/JobController.php:365
|
||||||
msgid "dreamjob.error.noWorker.title"
|
msgid "dreamjob.error.noWorker.title"
|
||||||
msgstr "Zugriff verweigert"
|
msgstr "Zugriff verweigert"
|
||||||
|
@ -652,6 +660,10 @@ msgstr "Anhänge"
|
||||||
msgid "dreamjob.agb.accept"
|
msgid "dreamjob.agb.accept"
|
||||||
msgstr "AGBs akzeptieren"
|
msgstr "AGBs akzeptieren"
|
||||||
|
|
||||||
|
#: View/Registration/worker.ctp:41
|
||||||
|
msgid "dreamjob.cost.accept"
|
||||||
|
msgstr "Kosten akzeptieren"
|
||||||
|
|
||||||
#: View/Job/application_send.ctp:46
|
#: View/Job/application_send.ctp:46
|
||||||
msgid "dreamjob.application.send"
|
msgid "dreamjob.application.send"
|
||||||
msgstr "bewerben"
|
msgstr "bewerben"
|
||||||
|
|
|
@ -54,6 +54,20 @@ echo $this->Form->create('DreamjobJobOpening',$default_Form);
|
||||||
<?=$this->Form->checkbox('DreamjobJobOpening.active',array("class"=>'form-control',"label"=>__("dreamjob.opening.active")))?>
|
<?=$this->Form->checkbox('DreamjobJobOpening.active',array("class"=>'form-control',"label"=>__("dreamjob.opening.active")))?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label">
|
||||||
|
<?=$this->Html->link(__("dreamjob.agb.accept"),array('controller'=>'home','action'=>'agb'),array('data-target'=>'#popup','data-toggle'=>"modal",'title'=>__('dreamjob.agb'),"ref"=>"eventOff"));?>
|
||||||
|
</label>
|
||||||
|
<div class="col-sm-9" style="text-align:left;">
|
||||||
|
<?=$this->Form->checkbox('DreamjobJobOpening.agb',array("class"=>'form-control',"label"=>__("dreamjob.agb")))?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-3 control-label"><?=__("dreamjob.cost.accept");?></label>
|
||||||
|
<div class="col-sm-9" style="text-align:left;">
|
||||||
|
<?=$this->Form->checkbox('DreamjobJobOpening.cost',array("class"=>'form-control',"label"=>__("dreamjob.cost")))?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<legend><?=__("dreamjob.address");?></legend>
|
<legend><?=__("dreamjob.address");?></legend>
|
||||||
<?php echo $this->Form->input('DreamjobJobOpening.street',array('placeholder'=>__('dreamjob.street.placeholder'),'label'=>array('text'=>__("dreamjob.street"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
<?php echo $this->Form->input('DreamjobJobOpening.street',array('placeholder'=>__('dreamjob.street.placeholder'),'label'=>array('text'=>__("dreamjob.street"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||||
echo $this->Form->input('DreamjobJobOpening.postcode',array('placeholder'=>__('dreamjob.postcode.placeholder'),'label'=>array('text'=>__("dreamjob.postcode"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
echo $this->Form->input('DreamjobJobOpening.postcode',array('placeholder'=>__('dreamjob.postcode.placeholder'),'label'=>array('text'=>__("dreamjob.postcode"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||||
|
|
|
@ -289,6 +289,10 @@ body.loading #container{
|
||||||
vertical-align:middle;
|
vertical-align:middle;
|
||||||
display:table-cell;
|
display:table-cell;
|
||||||
}
|
}
|
||||||
|
.opening-header .logo i img,.company-header .logo i img{
|
||||||
|
max-width:150px;
|
||||||
|
max-height:150px;
|
||||||
|
}
|
||||||
.opening-header .logo{
|
.opening-header .logo{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
Loading…
Reference in New Issue