diff --git a/app/Controller/HomeController.php b/app/Controller/HomeController.php index a652c93..4f38eba 100755 --- a/app/Controller/HomeController.php +++ b/app/Controller/HomeController.php @@ -66,9 +66,9 @@ class HomeController extends AppController { $this->MiconwareSession->init($this); if($this->MiconwareSession->logout()) - $this->MiconwareSession->setFlash('dreamjob.loggingoutSucess','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.loggingoutSucess'),'flash',array('alert'=>'success')); else - $this->MiconwareSession->setFlash('dreamjob.loggingoutError','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.loggingoutError'),'flash',array('alert'=>'danger')); $this->MiconwareSession->initWeb($this); $openings = $this->DreamjobJobOpening->find('all',array('conditions'=>$this->MiconwareSession->getOpeningCondition(), diff --git a/app/Controller/JobController.php b/app/Controller/JobController.php index c7c7d83..6e28cc3 100644 --- a/app/Controller/JobController.php +++ b/app/Controller/JobController.php @@ -37,9 +37,9 @@ class JobController extends AppController { $o =$this->DreamjobJobOpening->findById($this->request->query['del']); if($o['AppUser']['id']== $self['AppUser']['id']){ $this->DreamjobJobOpening->delete($this->request->query['del'],false); - $this->MiconwareSession->setFlash('dreamjob.opening.delete','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.opening.delete'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.opening.delete.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.opening.delete.error'),'flash',array('alert'=>'danger')); } } $openings = $this->DreamjobJobOpening->find('all',array('conditions' => array('DreamjobJobOpening.company_id' => $self['AppUser']['id']))); @@ -57,9 +57,9 @@ class JobController extends AppController { $this->DreamjobJobOpening->create($this->request->data); $this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $c['AppUser']['id']; 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')); }else{ - $this->MiconwareSession->setFlash('dreamjob.opening.save.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'),'flash',array('alert'=>'danger')); } } $this->set('kindofjobs', $this->DreamjobJobOpening->DreamjobListKindofjob->find('list')); @@ -91,10 +91,10 @@ class JobController extends AppController { $this->DreamjobJobOpening->data['DreamjobJobOpening']['id'] = $this->request->params['id']; $this->DreamjobJobOpening->data['DreamjobJobOpening']['company_id'] = $cid; 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')); }else - $this->MiconwareSession->setFlash('dreamjob.opening.save.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.opening.save.error'),'flash',array('alert'=>'danger')); } } $this->request->data=$load; @@ -132,12 +132,12 @@ class JobController extends AppController { $data = array('DreamjobJobFavority' => array('opening_id' => $this->request->params['id'], 'worker_id' => $WORKER['AppUser']['id']),'modified' => false); $data2 = array('DreamjobJobFavority.opening_id' => $this->request->params['id'], 'DreamjobJobFavority.worker_id' => $WORKER['AppUser']['id']); if($fav){ - $this->MiconwareSession->setFlash('dreamjob.opening.fav.delete','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.opening.fav.delete'),'flash',array('alert'=>'success')); $this->DreamjobJobFavority->deleteAll($data2,false); }else{ $this->DreamjobJobFavority->create(); $this->DreamjobJobFavority->save($data); - $this->MiconwareSession->setFlash('dreamjob.opening.fav.add','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.opening.fav.add'),'flash',array('alert'=>'success')); } } $con = $this->MiconwareSession->getOpeningCondition(); @@ -218,9 +218,9 @@ class JobController extends AppController { $this->DreamjobJobApplication->id = $application['DreamjobJobApplication']['id']; if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) { $application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] ))); - $this->MiconwareSession->setFlash('dreamjob.application.archiv','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.application.archiv'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.application.archiv.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.application.archiv.error'),'flash',array('alert'=>'danger')); } } if(!empty($this->request->params['ages'])){ @@ -232,9 +232,9 @@ class JobController extends AppController { $this->DreamjobJobMsg->data['DreamjobJobMsg']['fromcompany'] = is_array($COMPANY) and count($COMPANY) > 0; if($this->DreamjobJobMsg->sendMessage()) { $application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] ))); - $this->MiconwareSession->setFlash('dreamjob.application.msg.add','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.application.msg.add'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.application.msg.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.application.msg.error'),'flash',array('alert'=>'danger')); } } if(is_array($WORKER) and count($WORKER) > 0) @@ -285,9 +285,9 @@ class JobController extends AppController { $this->DreamjobJobApplication->id = $this->request->query['archiv']; if ($this->DreamjobJobApplication->saveField('closed',!$application['DreamjobJobApplication']['closed'])) { $application = $this->DreamjobJobApplication->find('first',array('conditions' => array('DreamjobJobApplication.id'=> $this->request->params['id'] ))); - $this->MiconwareSession->setFlash('dreamjob.application.archiv','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.application.archiv'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.application.archiv.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.application.archiv.error'),'flash',array('alert'=>'danger')); } } @@ -344,12 +344,12 @@ class JobController extends AppController { $this->request->data['DreamjobJobApplicationPage'][]=array('page_id'=> $id); $result = $this->DreamjobJobApplication->sendApplication($this->request->data); if ($result) { - $this->MiconwareSession->setFlash('dreamjob.opening.save.add','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.opening.save.add'),'flash',array('alert'=>'success')); }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.agb.error.notAccept','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'),'flash',array('alert'=>'danger')); } } $this->set('pages', $w['DreamjobPageInh']); diff --git a/app/Controller/RegistrationController.php b/app/Controller/RegistrationController.php index 35a6c13..64ce0df 100644 --- a/app/Controller/RegistrationController.php +++ b/app/Controller/RegistrationController.php @@ -56,15 +56,15 @@ class RegistrationController extends AppController { $result = $this->DreamjobCompany->registration($data); if ($result) { $regResult = true; - $this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.registration.done'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.registration.error'),'flash',array('alert'=>'danger')); } }else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){ $this->MiconwareSession->setFlash(__('dreamjob.error.password.notEqual'),'flash',array('alert'=>'danger')); } }else{ - $this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'),'flash',array('alert'=>'danger')); } } $this->set('result',$regResult); @@ -113,15 +113,15 @@ class RegistrationController extends AppController { if ($result) { $regResult = true; - $this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.registration.done'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.registration.error'),'flash',array('alert'=>'danger')); } }else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){ $this->MiconwareSession->setFlash(__('dreamjob.error.password.notEqual'),'flash',array('alert'=>'danger')); } }else{ - $this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.agb.error.notAccept'),'flash',array('alert'=>'danger')); } } $this->set('result',$regResult); diff --git a/app/Controller/UserController.php b/app/Controller/UserController.php index 8d6d155..2ce9160 100755 --- a/app/Controller/UserController.php +++ b/app/Controller/UserController.php @@ -137,9 +137,9 @@ class UserController extends AppController { } $result = $this->DreamjobCvEntry->saveAndDelete($tosave,$self['DreamjobCvEntry']); if($result){ - $this->MiconwareSession->setFlash('dreamjob.settings.save','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.save'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.save.error'),'flash',array('alert'=>'danger')); } } $cvc = $this->DreamjobListCvCategory->find('all'); @@ -284,9 +284,9 @@ class UserController extends AppController { if($result){ - $this->MiconwareSession->setFlash('dreamjob.settings.save','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.save'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.save.error'),'flash',array('alert'=>'danger')); } }else if($this->request->data['User']['password1']!='' or $this->request->data['User']['password2']!=''){ @@ -381,9 +381,9 @@ class UserController extends AppController { $profil = $this->MiconwareSession->getWorker(); if(empty($profil) or count($profil) <= 0) $profil = $this->MiconwareSession->getCompany(); - $this->MiconwareSession->setFlash('dreamjob.pages.delete','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.pages.delete'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.pages.delete.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.pages.delete.error'),'flash',array('alert'=>'danger')); } } $result = false; @@ -448,9 +448,9 @@ class UserController extends AppController { if($result){ $this->MiconwareSession->refreshCache(); $profil = $this->MiconwareSession->getWorker(); - $this->MiconwareSession->setFlash('dreamjob.settings.save','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.save'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.settings.save.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.save.error'),'flash',array('alert'=>'danger')); } } $this->request->data = $profil; @@ -489,9 +489,9 @@ class UserController extends AppController { $result = $this->User->sendDelete($profil); if($result){ - $this->MiconwareSession->setFlash('dreamjob.settings.delete.agree','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.delete.agree'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.settings.delete.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.delete.error'),'flash',array('alert'=>'danger')); } } $this->render('/User/settings_account_delete'); @@ -519,9 +519,9 @@ class UserController extends AppController { $data['AppUser']['avatar'] = $this->request->data['AppUser']['avatar']; $result = $this->AppUser->imageUpload($data); if($result){ - $this->MiconwareSession->setFlash('dreamjob.settings.avatar.done','flash',array('alert'=>'success')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.avatar.done'),'flash',array('alert'=>'success')); }else{ - $this->MiconwareSession->setFlash('dreamjob.settings.avatar.error','flash',array('alert'=>'danger')); + $this->MiconwareSession->setFlash(__('dreamjob.settings.avatar.error'),'flash',array('alert'=>'danger')); } } $this->request->data = $profil; diff --git a/app/Model/DreamjobJobMsg.php b/app/Model/DreamjobJobMsg.php index 4888516..e466b41 100644 --- a/app/Model/DreamjobJobMsg.php +++ b/app/Model/DreamjobJobMsg.php @@ -40,7 +40,6 @@ class DreamjobJobMsg extends AppModel { $Email->subject('Welcome to our really cool thing'); $Email->template('job_application_msg'); $Email->viewVars(array('id'=>$id)); - echo "Warum"; return $Email->send(); } public function sendMessage(){ @@ -49,6 +48,7 @@ class DreamjobJobMsg extends AppModel { $result = $this->save(); if($result){ $app = $this->Application->find('first', array('conditions' => array('DreamjobJobApplication.id' => $this->application_id))); + die($app); if($this->fromcompany) $result = self::sendMail($app['User']['mail'],$this->application_id); else