#169 Checkboxen AGB und Preise

This commit is contained in:
Geno 2015-02-11 20:05:35 +01:00
parent 2dc285388c
commit 4e4c12ac85
6 changed files with 97 additions and 34 deletions

View File

@ -60,6 +60,10 @@ 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')) {
if ($this->request->data['DreamjobJobOpening']['agb']) {
unset($this->request->data['DreamjobJobOpening']['agb']);
if ($this->request->data['DreamjobJobOpening']['cost']) {
unset($this->request->data['DreamjobJobOpening']['cost']);
$this->DreamjobJobOpening->create($this->request->data); $this->DreamjobJobOpening->create($this->request->data);
$this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id']; $this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id'];
$this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'],3); $this->DreamjobJobOpening->data['DreamjobJobOpening']['enddate'] = JobController::monthAdd($this->DreamjobJobOpening->data['DreamjobJobOpening']['startdate'],3);
@ -74,6 +78,12 @@ class JobController extends AppController {
} else { } else {
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger')); $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'));
$this->request->data['DreamjobJobOpening']['active']=true; $this->request->data['DreamjobJobOpening']['active']=true;
@ -113,6 +123,10 @@ 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'))) {
if ($this->request->data['DreamjobJobOpening']['agb']) {
unset($this->request->data['DreamjobJobOpening']['agb']);
if ($this->request->data['DreamjobJobOpening']['cost']) {
unset($this->request->data['DreamjobJobOpening']['cost']);
$addToEnddate = !empty($this->request->data['DreamjobJobOpening']['addToEnddate']); $addToEnddate = !empty($this->request->data['DreamjobJobOpening']['addToEnddate']);
$this->DreamjobJobOpening->create($this->request->data); $this->DreamjobJobOpening->create($this->request->data);
$this->DreamjobJobOpening->data['DreamjobJobOpening']['id'] = $this->request->params['id']; $this->DreamjobJobOpening->data['DreamjobJobOpening']['id'] = $this->request->params['id'];
@ -136,6 +150,12 @@ class JobController extends AppController {
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.success'), 'flash', array('alert' => 'success')); $this->MiconwareSession->setFlash(__('dreamjob.opening.save.success'), 'flash', array('alert' => 'success'));
} else } else
$this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'), 'flash', array('alert' => 'danger')); $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'));
} }

View File

@ -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 ""

View File

@ -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"

View File

@ -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'])));

View File

@ -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;