delete Account option
This commit is contained in:
parent
dc941eb8a9
commit
86654fc838
|
@ -28,6 +28,7 @@ class RegistrationController extends AppController {
|
|||
$this->MiconwareSession->init($this);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
if(!$this->MiconwareSession->isLoggedin()){
|
||||
$regResult = false;
|
||||
if ($this->request->is('post')){
|
||||
if($this->request->data['DreamjobCompany']['agb']) {
|
||||
unset($this->request->data['DreamjobCompany']['agb']);
|
||||
|
@ -53,6 +54,7 @@ class RegistrationController extends AppController {
|
|||
|
||||
$result = $this->DreamjobCompany->registration($data);
|
||||
if ($result) {
|
||||
$regResult = true;
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger'));
|
||||
|
@ -64,6 +66,7 @@ class RegistrationController extends AppController {
|
|||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
$this->set('result',$regResult);
|
||||
$this->set('branches',$this->DreamjobListBranch->find('list'));
|
||||
$this->render('/Registration/company');
|
||||
}else{
|
||||
|
@ -76,6 +79,7 @@ class RegistrationController extends AppController {
|
|||
$this->MiconwareSession->init($this);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
if(!$this->MiconwareSession->isLoggedin()){
|
||||
$regResult = false;
|
||||
if ($this->request->is('post')){
|
||||
if($this->request->data['DreamjobWorker']['agb']) {
|
||||
unset($this->request->data['DreamjobWorker']['agb']);
|
||||
|
@ -110,6 +114,7 @@ class RegistrationController extends AppController {
|
|||
}
|
||||
}
|
||||
if ($result) {
|
||||
$regResult = true;
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger'));
|
||||
|
@ -121,6 +126,7 @@ class RegistrationController extends AppController {
|
|||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
$this->set('result',$regResult);
|
||||
$this->set('mannerofaddresses',$this->Mannerofaddress->find('list'));
|
||||
$this->set('graducations',$this->DreamjobListGraducation->find('list'));
|
||||
$this->render('/Registration/worker');
|
||||
|
|
|
@ -47,6 +47,8 @@ class User extends AppModel {
|
|||
$dataSource->begin();
|
||||
$this->id = $data['User']['id'];
|
||||
$result = $this->saveField('code',$data['User']['code']);
|
||||
if($result)
|
||||
$result = $this->saveField('is_active',false);
|
||||
if($result)
|
||||
$result=self::sendDeleteMail($data);
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<div class="box">
|
||||
<h1><?=__('dreamjob.registration.company');?></h1>
|
||||
<?php
|
||||
if($result){
|
||||
echo $this->Form->create(false,$default_Form);
|
||||
?>
|
||||
<fieldset>
|
||||
|
@ -42,5 +43,8 @@
|
|||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
}else{
|
||||
echo __("dreamjob.registration.done.text");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<div class="box">
|
||||
<h1><?=__('dreamjob.registration.worker');?></h1>
|
||||
<?php
|
||||
if($result){
|
||||
echo $this->Form->create(false,$default_Form);
|
||||
?>
|
||||
<fieldset>
|
||||
|
@ -43,5 +44,8 @@
|
|||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
}else{
|
||||
echo __("dreamjob.registration.done.text");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue