application fertig (send) + startseite
This commit is contained in:
parent
5782499cb6
commit
f138ce8a22
|
@ -312,20 +312,25 @@ class JobController extends AppController {
|
|||
$this->set('error', 'dreamjob.error.opening.notFound');
|
||||
$this->render('/Home/error');
|
||||
}else{
|
||||
if ($this->request->is('post')) {
|
||||
echo var_dump($this->request->data);
|
||||
//$this->DreamjobJobApplication->create($this->request->data);
|
||||
$this->request->data['DreamjobJobOpening']['worker_id'] = $w['AppUser']['id'];
|
||||
$this->request->data['DreamjobJobOpening']['opening_id'] = $this->request->params['id'];
|
||||
if ($this->DreamjobJobOpening->saveAssociated($this->request->data)) {
|
||||
/*
|
||||
$this->DreamjobJobOpening->worker_id = $w['AppUser']['id'];
|
||||
$this->DreamjobJobOpening->opening_id = $this->request->params['id'];*/
|
||||
if($this->DreamjobJobOpening->save()){
|
||||
if ($this->request->is('post')){
|
||||
if($this->request->data['DreamjobJobApplication']['agb']) {
|
||||
unset($this->request->data['DreamjobJobApplication']['agb']);
|
||||
|
||||
$this->request->data['DreamjobJobApplication']['worker_id'] = $w['AppUser']['id'];
|
||||
$this->request->data['DreamjobJobApplication']['opening_id'] = $this->request->params['id'];
|
||||
$pages = $this->request->data['DreamjobJobApplicationPage']['page_id'];
|
||||
unset($this->request->data['DreamjobJobApplicationPage']['page_id']);
|
||||
foreach($pages as $id)
|
||||
$this->request->data['DreamjobJobApplicationPage'][]=array('page_id'=> $id);
|
||||
echo var_dump($this->request->data);
|
||||
$result = $this->DreamjobJobApplication->saveAssociated($this->request->data);
|
||||
if ($result) {
|
||||
$this->MiconwareSession->setFlash('dreamjob.opening.save.add','flash',array('alert'=>'success'));
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.opening.save.error','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}else{
|
||||
$this->MiconwareSession->setFlash('dreamjob.agb.error.notAccept','flash',array('alert'=>'danger'));
|
||||
}
|
||||
}
|
||||
$this->set('pages', $w['DreamjobPageInh']);
|
||||
|
|
|
@ -43,7 +43,7 @@ class DreamjobJobApplication extends AppModel {
|
|||
//'required' => false,
|
||||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
)
|
||||
),
|
||||
'stars' => array(
|
||||
'numeric' => array(
|
||||
|
@ -225,5 +225,9 @@ class DreamjobJobApplication extends AppModel {
|
|||
'className' => 'DreamjobJobMsg',
|
||||
'foreignKey' => 'application_id'
|
||||
),
|
||||
'DreamjobJobApplicationPage' => array(
|
||||
'className' => 'DreamjobJobApplicationPage',
|
||||
'foreignKey' => 'application_id'
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,23 @@ if($isLoggedin){
|
|||
<?php } ?>
|
||||
<li<?php if(isset($MENU_SETTINGS)){?> class="active"<?php } ?>><a href=""><img src="<c:url value="${STATIC_URL}img/bar-settings.png"/>"/></a></li>
|
||||
</ul>
|
||||
<?php
|
||||
<?php
|
||||
}elseif($MENU_START){
|
||||
?>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
.bar #barleft {
|
||||
width:128px;
|
||||
position:relative;
|
||||
right:-130px;
|
||||
}
|
||||
.column-center{
|
||||
padding-left:130px;
|
||||
width:1090px;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
<?php
|
||||
echo $this->Html->link(__('dreamjob.company.to'),array('controller'=>'home', 'action'=>'home'),array("class" => "btn btn-primary"));
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -8,14 +8,23 @@
|
|||
<div class="box">
|
||||
<h1><?=__('dreamjob.search');?></h1>
|
||||
<div class="searchform">
|
||||
<?php echo $this->Form->create(null,array('inputDefaults'=> array('div' => false,'label'=>false,'class' => 'form-control'))); ?>
|
||||
<?php echo $this->Form->create(null,array('inputDefaults'=> array('div' => false,'label'=>false,'class' => 'form-control'),'url'=>array('controller'=>'home', 'action'=>'home'))); ?>
|
||||
<div class="input-group">
|
||||
<?php echo $this->Form->input('textsearch');?>
|
||||
<span class="input-group-btn">
|
||||
<?php echo $this->Form->button('<span class="glyphicon glyphicon-search"></span>',array('div' => false,'class'=>"btn btn-default",'type' => 'submit')); ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php echo $this->Form->end(); ?>
|
||||
<?php
|
||||
echo $this->Form->end();
|
||||
echo "<br/>";
|
||||
if(!$isLoggedin){
|
||||
echo $this->Html->link(__('dreamjob.registration.to'),array('controller'=>'home', 'action'=>'home'),array("class" => "btn btn-primary"));
|
||||
echo "<br/>";
|
||||
echo "<br/>";
|
||||
}
|
||||
echo $this->Html->link(__('dreamjob.search.to'),array('controller'=>'home', 'action'=>'home'),array("class" => "btn btn-primary"));
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
</span>
|
||||
</div>
|
||||
<div class="box">
|
||||
<?=$this->element('job_opening_head');?>
|
||||
<?=$this->element('job_opening_head',array("opening"=>$application));?>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
<fieldset>
|
||||
<legend><?=__("dreamjob.application.form");?></legend>
|
||||
<?php
|
||||
echo
|
||||
//echo $this->Form->hidden('DreamjobJobApplication.id');
|
||||
echo $this->Form->hidden('DreamjobJobApplication.opening_id');
|
||||
echo $this->Form->hidden('DreamjobJobApplication.worker_id');
|
||||
echo $this->Form->textarea('DreamjobJobApplication.text',array("class"=>'form-control',"rows"=>10));
|
||||
?>
|
||||
|
||||
|
@ -24,11 +26,10 @@
|
|||
}
|
||||
echo $this->Form->select('DreamjobJobApplicationPage.page_id', $page_options, array(
|
||||
'multiple' => 'checkbox'));
|
||||
echo $this->element('sql_dump');
|
||||
?>
|
||||
<div class="buttonrow">
|
||||
<div class="checkbox" style="width:20%;display:inline-block;">
|
||||
<input type="checkbox" name="agb"/><?=__("dreamjob.agb.accept");?>
|
||||
<?=$this->Form->checkbox('agb').__("dreamjob.agb.accept");?>
|
||||
</div>
|
||||
<br/>
|
||||
<?=$this->Form->button(__('dreamjob.application.send'),array('div' => false,'class'=>"btn btn-default ",'type' => 'submit'));?>
|
||||
|
|
|
@ -341,7 +341,7 @@ body.loading #container{
|
|||
width:465px;
|
||||
height:282px;
|
||||
background-color:#9d1c16;
|
||||
padding-top:40px;
|
||||
padding-top:20px;
|
||||
}
|
||||
.start-search-box .box h1{
|
||||
color:white;
|
||||
|
@ -363,6 +363,10 @@ body.loading #container{
|
|||
line-height:1.42857;
|
||||
color:white;
|
||||
}
|
||||
.start-search-box .box .searchform .btn.btn-primary{
|
||||
background-color:red;
|
||||
border-color:red;
|
||||
}
|
||||
/*
|
||||
* Messages
|
||||
*/
|
||||
|
@ -377,3 +381,7 @@ body.loading #container{
|
|||
.infofield{
|
||||
color:black;
|
||||
}
|
||||
.btn.btn-primary{
|
||||
background-color:red;
|
||||
border-color:orange;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue