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