registration gui
This commit is contained in:
parent
5bbd0872bb
commit
4b0a3942f9
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
App::uses('AppController', 'Controller');
|
||||
|
||||
class RegistrationController extends AppController {
|
||||
|
||||
/**
|
||||
* This controller use User Model
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
|
||||
public $uses = array('Mannerofaddress','DreamjobListGraducation','DreamjobListBranch');
|
||||
|
||||
public function main() {
|
||||
$this->MiconwareSession->init($this);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
if(!$this->MiconwareSession->isLoggedin()){
|
||||
$this->render('/Registration/main');
|
||||
}else{
|
||||
$this->set('error', 'dreamjob.error.loggedin');
|
||||
$this->render('/Home/error');
|
||||
}
|
||||
}
|
||||
|
||||
public function company() {
|
||||
$this->MiconwareSession->init($this);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
if(!$this->MiconwareSession->isLoggedin()){
|
||||
if ($this->request->is('post')){
|
||||
if($this->request->data['DreamjobCompany']['agb']) {
|
||||
unset($this->request->data['DreamjobCompany']['agb']);
|
||||
$result = $this->DreamjobCompany->registration($this->request->data);
|
||||
if ($result) {
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
$this->set('branches',$this->DreamjobListBranch->find('list'));
|
||||
$this->render('/Registration/company');
|
||||
}else{
|
||||
$this->set('error', 'dreamjob.error.loggedin');
|
||||
$this->render('/Home/error');
|
||||
}
|
||||
}
|
||||
|
||||
public function worker() {
|
||||
$this->MiconwareSession->init($this);
|
||||
$this->MiconwareSession->initWeb($this);
|
||||
if(!$this->MiconwareSession->isLoggedin()){
|
||||
if ($this->request->is('post')){
|
||||
if($this->request->data['DreamjobWorker']['agb']) {
|
||||
unset($this->request->data['DreamjobWorker']['agb']);
|
||||
$result = $this->DreamjobWorker->registration($this->request->data);
|
||||
if ($result) {
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.done','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.registration.error','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
$this->set('mannerofaddresses',$this->Mannerofaddress->find('list'));
|
||||
$this->set('graducations',$this->DreamjobListGraducation->find('list'));
|
||||
$this->render('/Registration/worker');
|
||||
}else{
|
||||
$this->set('error', 'dreamjob.error.loggedin');
|
||||
$this->render('/Home/error');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<h1><?=__('dreamjob.registration.company');?></h1>
|
||||
<?php
|
||||
echo $this->Form->create(false,$default_Form);
|
||||
?>
|
||||
<fieldset>
|
||||
<legend><?=__("dreamjob.account");?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('User.mail',array('label'=>array('text'=>__("dreamjob.mail"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('User.password1',array('label'=>array('text'=>__("dreamjob.password"),"class"=>$default_Form['inputDefaults']['label']['class']),'type'=>'password'));
|
||||
echo $this->Form->input('User.password2',array('label'=>array('text'=>__("dreamjob.password2"),"class"=>$default_Form['inputDefaults']['label']['class']),'type'=>'password'));
|
||||
?>
|
||||
<legend><?=__("dreamjob.company");?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('AppUser.nickname',array('label'=>array('text'=>__("dreamjob.company.nickname"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobCompany.corporateform',array('label'=>array('text'=>__("dreamjob.corporateform"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobCompany.owner',array('label'=>array('text'=>__("dreamjob.owner"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobCompany.branch_id',array('label'=>array('text'=>__("dreamjob.branch"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobCompany.headcount',array('label'=>array('text'=>__("dreamjob.headcount"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
//echo $this->Form->input('DreamjobCompany.bank_details',array('label'=>array('text'=>__("dreamjob.bank_details"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobCompany.website',array('label'=>array('text'=>__("dreamjob.website"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
?>
|
||||
<legend><?=__("dreamjob.addresse");?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('DreamjobUser.street',array('label'=>array('text'=>__("dreamjob.street"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobUser.city',array('label'=>array('text'=>__("dreamjob.city"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobUser.postcode',array('label'=>array('text'=>__("dreamjob.postcode"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
?>
|
||||
<div class="buttonrow">
|
||||
<div class="checkbox" style="width:20%;display:inline-block;">
|
||||
<?=$this->Form->checkbox('DreamjobCompany.agb');?>
|
||||
<?=$this->Html->link(__("dreamjob.agb.accept"),array('controller'=>'home','action'=>'agb'),array('data-target'=>'#popup','data-toggle'=>"modal",'title'=>__('dreamjob.agb'),"ref"=>"eventOff"));?>
|
||||
</div>
|
||||
<br/>
|
||||
<?=$this->Form->button(__('dreamjob.settings.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<h1><?=__('dreamjob.registration');?></h1>
|
||||
<?php
|
||||
echo $this->Html->link(__('dreamjob.worker'),array('controller'=>'registration','action'=>'worker'));
|
||||
echo '<br/>';
|
||||
echo $this->Html->link(__('dreamjob.company'),array('controller'=>'registration','action'=>'company'));
|
||||
?>
|
||||
</div>
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/*
|
||||
*
|
||||
*/
|
||||
?>
|
||||
<div class="box">
|
||||
<h1><?=__('dreamjob.registration.worker');?></h1>
|
||||
<?php
|
||||
echo $this->Form->create(false,$default_Form);
|
||||
?>
|
||||
<fieldset>
|
||||
<legend><?=__("dreamjob.account");?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('User.mail',array('label'=>array('text'=>__("dreamjob.mail"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('User.password1',array('label'=>array('text'=>__("dreamjob.password"),"class"=>$default_Form['inputDefaults']['label']['class']),'type'=>'password'));
|
||||
echo $this->Form->input('User.password2',array('label'=>array('text'=>__("dreamjob.password2"),"class"=>$default_Form['inputDefaults']['label']['class']),'type'=>'password'));
|
||||
?>
|
||||
<legend><?=__("dreamjob.worker");?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('AppUser.mannerofaddress_id',array('label'=>array('text'=>__("dreamjob.mannerofaddress"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('AppUser.first_name',array('label'=>array('text'=>__("dreamjob.first_name"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('AppUser.last_name',array('label'=>array('text'=>__("dreamjob.last_name"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('AppUser.bday',array('label'=>array('text'=>__("dreamjob.bday"),"class"=>$default_Form['inputDefaults']['label']['class']),"style"=>'width:20%;display:inline-block;'));
|
||||
echo $this->Form->input('DreamjobWorker.iam',array('label'=>array('text'=>__("dreamjob.iam"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobWorker.graducation_id',array('label'=>array('text'=>__("dreamjob.graducation"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobWorker.workexperience',array('label'=>array('text'=>__("dreamjob.workexperience"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
?>
|
||||
<legend><?=__("dreamjob.addresse");?></legend>
|
||||
<?php
|
||||
echo $this->Form->input('DreamjobUser.street',array('label'=>array('text'=>__("dreamjob.street"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobUser.city',array('label'=>array('text'=>__("dreamjob.city"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobUser.postcode',array('label'=>array('text'=>__("dreamjob.postcode"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
echo $this->Form->input('DreamjobWorker.country',array('label'=>array('text'=>__("dreamjob.country"),"class"=>$default_Form['inputDefaults']['label']['class'])));
|
||||
?>
|
||||
<div class="buttonrow">
|
||||
<div class="checkbox" style="width:20%;display:inline-block;">
|
||||
<?=$this->Form->checkbox('DreamjobWorker.agb');?>
|
||||
<?=$this->Html->link(__("dreamjob.agb.accept"),array('controller'=>'home','action'=>'agb'),array('data-target'=>'#popup','data-toggle'=>"modal",'title'=>__('dreamjob.agb'),"ref"=>"eventOff"));?>
|
||||
</div>
|
||||
<br/>
|
||||
<?=$this->Form->button(__('dreamjob.settings.save'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||
</div>
|
||||
</fieldset>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
?>
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue