externe bewerbung Formulat
This commit is contained in:
parent
ab244e193f
commit
f6292f474f
|
@ -0,0 +1,65 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
* Formular zum Bewerbungen verschicken
|
||||||
|
*/
|
||||||
|
?>
|
||||||
|
<div class="box">
|
||||||
|
<h1><?=__('dreamjob.application.extern');?></h1>
|
||||||
|
<?php echo $this->Form->create('DreamjobJobApplication',$default_Form); ?>
|
||||||
|
<fieldset>
|
||||||
|
<legend><?=__("dreamjob.application.form");?></legend>
|
||||||
|
<?=$WORKER['AppUser']['first_name'].' '.$WORKER['AppUser']['last_name'];?><br/>
|
||||||
|
<?=$WORKER['DreamjobUser']['street'];?><br/>
|
||||||
|
<?=$WORKER['DreamjobUser']['postcode'].' '.$WORKER['DreamjobListCity']['name'];?><br/>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<div style="width:39.666%;margin-bottom:5px;">
|
||||||
|
<?=$this->Form->text('AppUser.nickname', array('label'=>false,'class'=>'form-control','placeholder'=>__('dreamjob.company')));?>
|
||||||
|
</div>
|
||||||
|
<div style="width:39.666%;margin-bottom:5px;">
|
||||||
|
<?=$this->Form->text('DreamjobUser.street', array('label'=>false,'class'=>'form-control','placeholder'=>__('dreamjob.street')));?>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-2">
|
||||||
|
<?=$this->Form->text('DreamjobUser.postcode', array('label'=>false,'class'=>'form-control','placeholder'=>__('dreamjob.postcode')));?>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-3">
|
||||||
|
<?=$this->Form->text('DreamjobListCity.name', array('label'=>false,'class'=>'form-control','placeholder'=>__('dreamjob.city')));?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
<?=$opening['AppUser']['nickname'];?><br/>
|
||||||
|
<?=$opening['DreamjobUser']['street'];?><br/>
|
||||||
|
<?=$opening['DreamjobUser']['postcode'].' '.$opening['DreamjobListCity']['name'];?><br/>
|
||||||
|
|
||||||
|
//echo $this->Form->hidden('DreamjobJobApplication.id');
|
||||||
|
echo $this->Form->hidden('DreamjobJobApplication.opening_id');
|
||||||
|
*/
|
||||||
|
echo $this->Form->hidden('DreamjobJobApplication.worker_id');
|
||||||
|
echo $this->Form->text('DreamjobJobApplication.subject',array('label'=>false,'placeholder'=>__('dreamjob.opening.subject.placeholder'),'class'=>'form-control')).'<br/>';
|
||||||
|
?>
|
||||||
|
<div><?=$this->Form->textarea('DreamjobJobApplication.text',array("class"=>'form-control',"rows"=>10));?></div>
|
||||||
|
|
||||||
|
<legend><?=__("dreamjob.application.addPages");?></legend>
|
||||||
|
<?php
|
||||||
|
$page_options = array();
|
||||||
|
foreach($pages as $page){
|
||||||
|
$page_options[$page['id']]= $page['title'];
|
||||||
|
}
|
||||||
|
echo $this->Form->select('DreamjobJobApplicationPage.page_id', $page_options, array(
|
||||||
|
'multiple' => 'checkbox'));
|
||||||
|
?>
|
||||||
|
<div class="buttonrow">
|
||||||
|
<div class="checkbox" style="width:20%;display:inline-block;">
|
||||||
|
<?=$this->Form->checkbox('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.application.send'),array('div' => false,'class'=>"btn btn-primary ",'type' => 'submit'));?>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
<?php echo $this->Form->end(); ?>
|
||||||
|
</div>
|
|
@ -0,0 +1,105 @@
|
||||||
|
<?php
|
||||||
|
App::import('Vendor','tcpdf/xtcpdf');
|
||||||
|
ob_end_clean();
|
||||||
|
header("Content-type: application/pdf");
|
||||||
|
|
||||||
|
$cvinhalt = $this->element('user_worker_cv_pdf',array('profil'=>array('User'=>$application['WorkerUser']
|
||||||
|
,'AppUser'=>$application['AppUserWorker'],'DreamjobWorker'=>$application['DreamjobWorker'],'DreamjobListGraducation'=>$application['WorkerGraducation'],'DreamjobListCity'=>$application['DreamjobWorkerListCity'])));
|
||||||
|
|
||||||
|
|
||||||
|
$dev = 0;
|
||||||
|
$tcpdf = new XTCPDF();
|
||||||
|
$tcpdf->SetMargins(25,35,25,20);
|
||||||
|
$tcpdf->SetAuthor("Miconware");
|
||||||
|
$tcpdf->SetAutoPageBreak( false );
|
||||||
|
|
||||||
|
$tcpdf->mail=$application['WorkerUser']['mail'];
|
||||||
|
|
||||||
|
$tcpdf->AddPage();
|
||||||
|
|
||||||
|
// Deckblatt
|
||||||
|
$tcpdf->SetY(35);
|
||||||
|
$tcpdf->SetTextColor(0, 0, 0);
|
||||||
|
$tcpdf->SetFont($tcpdf->font);
|
||||||
|
|
||||||
|
$url=WWW_ROOT.DS.'img'.DS.'icon_user.png';
|
||||||
|
if($application['AppUserWorker']['take_systemwide']){
|
||||||
|
if($application['WorkerUser']['avatar'])
|
||||||
|
$url = WWW_ROOT.DS.'uploads'.DS.$application['WorkerUser']['avatar'];
|
||||||
|
}else
|
||||||
|
if($profil['AppUserWorker']['avatar'])
|
||||||
|
$url = WWW_ROOT.DS.'uploads'.DS.$application['AppUserWorker']['avatar'];
|
||||||
|
|
||||||
|
$tcpdf->Image($url,0,40,0,140,'','','','',300,'L');
|
||||||
|
$tcpdf->SetY(185);
|
||||||
|
//$tcpdf->SetFont($tcpdf->font,'B',$tcpdf->fontsize+4);
|
||||||
|
//$tcpdf->Cell(0,0, , 0,1,'L');
|
||||||
|
//$tcpdf->SetFont($tcpdf->font,'',$tcpdf->fontsize);
|
||||||
|
$tcpdf->writeHTML('<h1>'.__('dreamjob.application.extern').'</h1>'.__('dreamjob.application.for').' '.$application['DreamjobJobOpening']['title']);
|
||||||
|
|
||||||
|
$tcpdf->SetY(255);
|
||||||
|
$tcpdf->Cell(0,0, $application['Mannerofaddress']['name'].' '.$application['AppUserWorker']['first_name'].' '.$application['AppUserWorker']['last_name'], 0,1,'R');
|
||||||
|
$tcpdf->Cell(0,0, $application['DreamjobUserWorker']['street'], 0,1,'R');
|
||||||
|
$tcpdf->Cell(0,0, $application['DreamjobUserWorker']['postcode'].' '.$application['DreamjobWorkerListCity']['name'], 0,1,'R');
|
||||||
|
|
||||||
|
//Anschreiben
|
||||||
|
$tcpdf->SetAutoPageBreak( true, 20);
|
||||||
|
$tcpdf->title=__('dreamjob.application.why');
|
||||||
|
$tcpdf->AddPage();
|
||||||
|
$tcpdf->SetY(35);
|
||||||
|
$tcpdf->SetTextColor(0, 0, 0);
|
||||||
|
$tcpdf->SetFont($tcpdf->font);
|
||||||
|
|
||||||
|
$tcpdf->Cell(0,0, $application['AppUserWorker']['first_name'].' '.$application['AppUserWorker']['last_name'], 0,1,'L');
|
||||||
|
$tcpdf->Cell(0,0, $application['DreamjobUserWorker']['street'], 0,1,'L');
|
||||||
|
$tcpdf->Cell(0,0, $application['DreamjobUserWorker']['postcode'].' '.$application['DreamjobWorkerListCity']['name'], 0,1,'L');
|
||||||
|
$tcpdf->SetY(60);
|
||||||
|
$tcpdf->Cell(0,0, $application['AppUser']['nickname'], 0,1,'L');
|
||||||
|
$tcpdf->Cell(0,0, $application['DreamjobUser']['street'], 0,1,'L');
|
||||||
|
$tcpdf->Cell(0,0, $application['DreamjobUser']['postcode'].' '.$application['DreamjobListCity']['name'], 0,1,'L');
|
||||||
|
|
||||||
|
$tcpdf->writeHTML('<br/><h2>'.$application['DreamjobJobApplication']['subject'].'</h2><br/>'.$application['DreamjobJobApplication']['text']);
|
||||||
|
|
||||||
|
//Lebenslauf
|
||||||
|
$tcpdf->title=__('dreamjob.cv');
|
||||||
|
$tcpdf->AddPage();
|
||||||
|
$tcpdf->SetY(35);
|
||||||
|
$tcpdf->SetTextColor(0, 0, 0);
|
||||||
|
$tcpdf->SetFont($tcpdf->font);
|
||||||
|
|
||||||
|
$tcpdf->writeHTML($cvinhalt);
|
||||||
|
$tcpdf->SetAutoPageBreak( false );
|
||||||
|
|
||||||
|
//Anhang
|
||||||
|
foreach($application['Page'] as $page){
|
||||||
|
$tcpdf->title=$page['title'];
|
||||||
|
$tcpdf->AddPage();
|
||||||
|
$tcpdf->SetY(35);
|
||||||
|
$tcpdf->SetTextColor(0, 0, 0);
|
||||||
|
$tcpdf->SetFont($tcpdf->font);
|
||||||
|
|
||||||
|
$pageType = null;
|
||||||
|
foreach($application['PageImage'] as $pg){
|
||||||
|
if($page['id'] == $pg['page_ptr_id'])
|
||||||
|
$pageType=$pg;
|
||||||
|
}
|
||||||
|
if($pageType==null){
|
||||||
|
foreach($application['PageText'] as $pg){
|
||||||
|
if($page['id'] == $pg['page_ptr_id'])
|
||||||
|
$pageType=$pg;
|
||||||
|
}
|
||||||
|
//$tcpdf->writeHTMLCell(0,235,10,35, $pageType['text'], $dev,0,false,true,'L');
|
||||||
|
$tcpdf->writeHTML($pageType['text']);
|
||||||
|
}else{
|
||||||
|
$tcpdf->Image(WWW_ROOT.DS.'uploads'.DS.$pageType['image'],0,35,0,235,'','','','',300,'C');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ...
|
||||||
|
// etc.
|
||||||
|
// see the TCPDF examples
|
||||||
|
|
||||||
|
//$tcpdf->Output('filename.pdf','I');
|
||||||
|
// TO Download
|
||||||
|
$tcpdf->Output('filename.pdf','D');
|
||||||
|
return null;
|
||||||
|
?>
|
Loading…
Reference in New Issue