dreamjob/app/View/Elements/user_worker_cv_edit.ctp

140 lines
6.8 KiB
PHP

<?php
/*
*
*/
$default_hForm['url']=array('controller'=>'user','action'=>'profil_edit');
echo $this->Form->create('DreamjobCvEntry',$default_hForm);
?>
<h3><?=__("dreamjob.cv");?><span class="label label-default save" style="font-size:12px;"><span class="glyphicon glyphicon-floppy-disk"></span> <?=__('dreamjob.save');?></span></h3>
<?php
$i = 0;
foreach($cvc as $cvc_item){
?>
<h4><?=$cvc_item['DreamjobListCvCategory']['name'];?></h4>
<table class="cv table table-striped">
<tbody>
<?php
while(count($cve) > $i and $cvc_item['DreamjobListCvCategory']['id']==$cve[$i]['DreamjobCvEntry']['category_id']){
?>
<tr data="set">
<?php
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate'] and $cvc_item['DreamjobListCvCategory']['place']){
?>
<td><?=__('dreamjob.between');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date')));?> <br/> <?=__('dreamjob.between.till');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><br/><span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['place']){
if($cvc_item['DreamjobListCvCategory']['startdate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else{
?>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></td>
<?php
}
?>
<?php
if($cvc_item['DreamjobListCvCategory']['startdate'] or $cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><br/><span><?=$this->Form->input('DreamjobCvEntry.'.$i.'.place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
<?php
}
}else{
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=__('dreamjob.between');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date')));?> <br/> <?=__('dreamjob.between.till');?>: <?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['startdate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.startdate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else{
?>
ERROR
<?php
}
?>
<td><?=$this->Form->input('DreamjobCvEntry.'.$i.'.title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
<?php
}
?>
<?=$this->Form->input('DreamjobCvEntry.'.$i.'.category_id',array('type'=>'hidden'));?>
<?=$this->Form->input('DreamjobCvEntry.'.$i.'.id',array('type'=>'hidden'));?>
</tr>
<?php
$i++;
}
?>
<tr class="new">
<?php
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate'] and $cvc_item['DreamjobListCvCategory']['place']){
?>
<td><?=__('dreamjob.between');?>: <?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date')));?> <br/> <?=__('dreamjob.between.till');?>: <?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><br/><span><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['place']){
if($cvc_item['DreamjobListCvCategory']['startdate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else{
?>
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
<td><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></td>
<?php
}
?>
<?php
if($cvc_item['DreamjobListCvCategory']['startdate'] or $cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?><br/><span><?=$this->Form->input('DreamjobCvEntry..place',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['place_str']));?></span></td>
<?php
}
}else{
if($cvc_item['DreamjobListCvCategory']['startdate'] and $cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=__('dreamjob.between');?>: <?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date')));?> <br/> <?=__('dreamjob.between.till');?>: <?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['startdate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry..startdate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else if($cvc_item['DreamjobListCvCategory']['enddate']){
?>
<td><?=$this->Form->input('DreamjobCvEntry..enddate',array('empty'=>__('dreamjob.chooseOne.date')));?></td>
<?php
}else{
?>
ERROR
<?php
}
?>
<td><?=$this->Form->input('DreamjobCvEntry..title',array('placeholder'=>$cvc_item['DreamjobListCvCategory']['title_str']));?></td>
<?php
}
?>
<?=$this->Form->input('DreamjobCvEntry..category_id',array('type'=>'hidden','value'=>$cvc_item['DreamjobListCvCategory']['id']));?>
</tr>
</tbody>
</table>
<?php
}
echo $this->Form->end();
?>