git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_IntranetNueva/trunk@71 77cfc57b-8ef4-1849-9df6-4a38aa5da120
345 lines
15 KiB
PHP
345 lines
15 KiB
PHP
<?php
|
|
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/custom/elements.js');
|
|
/*Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/plugins/wysiwyg/jquery.wysiwyg.js');
|
|
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . 'js/plugins/wysiwyg/wysiwyg.image.js');
|
|
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . 'js/plugins/wysiwyg/wysiwyg.link.js');
|
|
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . 'js/plugins/wysiwyg/wysiwyg.table.js');
|
|
|
|
$script=<<<HTML
|
|
jQuery(document).ready(function() {
|
|
jQuery('#wysiwyg').wysiwyg({
|
|
initialContent: "",
|
|
controls: {
|
|
cut: { visible: true },
|
|
copy: { visible: true },
|
|
paste: { visible: true }
|
|
}
|
|
});
|
|
});
|
|
HTML;
|
|
|
|
Yii::app()->clientScript->registerScript('wysiwyg', $script, CClientScript::POS_END);*/
|
|
|
|
?>
|
|
|
|
<?php $form=$this->beginWidget('CActiveForm', array(
|
|
'id'=>'candidato-form',
|
|
//'enableAjaxValidation'=>true,
|
|
'htmlOptions'=>array('enctype' => 'multipart/form-data'),
|
|
)); ?>
|
|
|
|
<div class="two_third last">
|
|
<div class="notification msginfo">
|
|
<a class="close"></a>
|
|
<p>Los campos marcados con <span class="required">*</span> son obligatorios.</p>
|
|
</div><!-- notification msginfo -->
|
|
|
|
<?php echo $form->errorSummary($model, "<a class='close'></a>", "", array('class'=>"notification msgerror")); ?>
|
|
</div>
|
|
<br clear="all" />
|
|
<div class="widgetbox two_third last form_default">
|
|
<h3>
|
|
<span>
|
|
<legend><?php echo Yii::t('intranet', 'Datos personales');?></legend>
|
|
</span>
|
|
</h3>
|
|
<div class="content nopadding">
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'foto', array('class'=>'nopadding')); ?>
|
|
<div class="marginleft150">
|
|
<?php
|
|
echo CHtml::image($model->foto, $model->nombre,
|
|
array("title" => $model->nombre, "width"=>"120", "height"=>"120")
|
|
); ?>
|
|
<?php echo CHtml::activeFileField($model, 'foto'); ?>
|
|
<?php echo $form->error($model,'foto', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="padding1020 ">
|
|
<?php echo $form->labelEx($model,'nombre'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'nombre',array('maxlength'=>255,'class'=>'mf')); ?>
|
|
<?php echo $form->error($model,'nombre', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'apellidos'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'apellidos',array('maxlength'=>255,'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'apellidos', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'sexo', array('class'=>'nopadding')); ?>
|
|
<div class="marginleft150">
|
|
<?php echo CHtml::activeRadioButtonList($model, 'sexo', $model->OpcionesGenero, array(
|
|
'template' => '{input}{label}',
|
|
'separator' => ' ',
|
|
)); ?>
|
|
<?php echo $form->error($model,'sexo', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'dni'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'dni',array('maxlength'=>255,'class'=>'sf')); ?>
|
|
<?php echo $form->error($model,'dni', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'carnet_conducir'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'carnet_conducir',array('maxlength'=>255,'class'=>'sf')); ?>
|
|
<?php echo $form->error($model,'carnet_conducir', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'fecha_nacimiento'); ?>
|
|
<div class="marginleft150">
|
|
<?php
|
|
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
|
|
'model'=>$model,
|
|
'attribute'=>'fecha_nacimiento',
|
|
'name'=>'fecha_nacimiento',
|
|
'language'=>'es',
|
|
'options'=>array(
|
|
'maxDate'=>'+0d',
|
|
'selectOtherMonths'=>true,
|
|
'showButtonPanel'=>true,
|
|
'showOtherMonths'=>true,
|
|
'changeMonth' => true,
|
|
'changeYear' => true,
|
|
),
|
|
'htmlOptions' => array(
|
|
'class' => 'sf',
|
|
)
|
|
));
|
|
?>
|
|
<?php echo $form->error($model,'fecha_nacimiento', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'lugar_nacimiento'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'lugar_nacimiento',array('maxlength'=>255,'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'lugar_nacimiento', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'Rango salarial'); ?>
|
|
<div class="marginleft150">
|
|
<span id="salario_min" class="color069"><?php echo $model->attributes['salario_minimo']; ?></span> € - <span id="salario_max" class="color069"><?php echo $model->attributes['salario_maximo']; ?></span>€
|
|
|
|
<?php
|
|
$this->widget('zii.widgets.jui.CJuiSliderInput', array(
|
|
'model'=>$model,
|
|
'attribute'=>'salario_minimo',
|
|
'maxAttribute'=>'salario_maximo',
|
|
'event'=>'change',
|
|
'options'=>array(
|
|
'range'=>true,
|
|
'step'=>1000,
|
|
'min'=>12000,
|
|
'max'=>60000,
|
|
'slide'=>'js:function(event,ui){$("#salario_min").text(ui.values[0]);$("#salario_max").text(ui.values[1]);}',
|
|
),
|
|
'htmlOptions' => array(
|
|
'class' => 'lf',
|
|
),
|
|
));
|
|
?>
|
|
<?php echo $form->error($model, 'Rango salarial'); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<br clear="all" />
|
|
</div>
|
|
</div>
|
|
<br clear="all" />
|
|
<div class="widgetbox two_third last form_default">
|
|
<h3>
|
|
<span>
|
|
<legend><?php echo Yii::t('intranet', 'Datos de contacto');?></legend>
|
|
</span>
|
|
</h3>
|
|
<div class="content nopadding">
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'telefono_fijo'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'telefono_fijo',array('maxlength'=>255,'class'=>'sf')); ?>
|
|
<?php echo $form->error($model,'telefono_fijo', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
<div class="padding1020 borderbottom">
|
|
<?php echo $form->labelEx($model,'telefono_movil'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'telefono_movil',array('maxlength'=>255,'class'=>'sf')); ?>
|
|
<?php echo $form->error($model,'telefono_movil', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
<div class="padding1020 borderbottom">
|
|
<?php echo $form->labelEx($model,'email'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'email',array('maxlength'=>255,'class'=>'mf')); ?>
|
|
<?php echo $form->error($model,'email', array('class'=>'errortext')); ?>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'localidad'); ?>
|
|
<div class="marginleft150">
|
|
<?php
|
|
$lista = CHtml::listData(Poblacion::model()->findAll(),'id', 'poblacion', 'provincia_id');
|
|
$provincias = Provincia::model()->findAll();
|
|
|
|
foreach ($provincias as $provincia) {
|
|
if (array_key_exists($provincia->id, $lista)) {
|
|
$lista[$provincia->provincia] = $lista[$provincia->id];
|
|
unset($lista[$provincia->id]);
|
|
}
|
|
}
|
|
echo $form->dropDownList(
|
|
$model,
|
|
'localidad',
|
|
$lista,
|
|
array(
|
|
'empty'=>'<Seleccionar>',
|
|
'class'=>'mf',
|
|
));
|
|
?>
|
|
<?php echo $form->error($model,'localidad', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<br clear="all" />
|
|
</div>
|
|
</div>
|
|
<br clear="all" />
|
|
<div class="widgetbox two_third last form_default">
|
|
<h3>
|
|
<span>
|
|
<legend><?php echo Yii::t('intranet', 'Datos académicos');?></legend>
|
|
</span>
|
|
</h3>
|
|
<div class="content nopadding ohidden">
|
|
<?php $this->renderPartial('_idiomas', array(
|
|
'model'=>$model,
|
|
'idioma'=>$idioma,
|
|
'idiomasValidos'=>$idiomasValidos,
|
|
)); ?>
|
|
|
|
<?php $this->renderPartial('_titulaciones', array(
|
|
'model'=>$model,
|
|
'titulacion'=>$titulacion,
|
|
'titulacionesValidas'=>$titulacionesValidas,
|
|
)); ?>
|
|
</div>
|
|
</div>
|
|
<br clear="all" />
|
|
<div class="widgetbox two_third last form_default">
|
|
<h3>
|
|
<span>
|
|
<legend><?php echo Yii::t('intranet', 'Disponibilidad');?></legend>
|
|
</span>
|
|
</h3>
|
|
<div class="content nopadding">
|
|
|
|
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'estado'); ?>
|
|
<div class="marginleft150">
|
|
<?php
|
|
$lista = CHtml::listData(EstadoCandidato::model()->findAll(),'id', 'descripcion');
|
|
|
|
echo $form->dropDownList(
|
|
$model,
|
|
'id_estado',
|
|
$lista,
|
|
array(
|
|
'class'=>'mf',
|
|
));
|
|
?>
|
|
<?php echo $form->error($model,'id_estado', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'disponibilidad_incorporacion'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'disponibilidad_incorporacion',array('maxlength'=>255,'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'disponibilidad_incorporacion', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
<div class="padding1020 borderbottom">
|
|
<?php echo $form->labelEx($model,'disponibilidad_entrevistas'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'disponibilidad_entrevistas',array('maxlength'=>255,'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'disponibilidad_entrevistas', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
<div class="padding1020 borderbottom">
|
|
<?php echo $form->labelEx($model,'disponibilidad_guardias'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'disponibilidad_guardias',array('maxlength'=>255,'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'disponibilidad_guardias', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
<div class="padding1020 borderbottom">
|
|
<?php echo $form->labelEx($model,'disponibilidad_viajar'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'disponibilidad_viajar',array('maxlength'=>255,'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'disponibilidad_viajar', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
<div class="padding1020 borderbottom">
|
|
<?php echo $form->labelEx($model,'disponibilidad_proyectos_internacionales'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textField($model,'disponibilidad_proyectos_internacionales',array('maxlength'=>255,'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'disponibilidad_proyectos_internacionales', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<br clear="all" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<br clear="all" />
|
|
<div class="widgetbox two_third last form_default">
|
|
<h3>
|
|
<span>
|
|
<legend><?php echo Yii::t('intranet', 'Observaciones'); ?></legend>
|
|
</span>
|
|
</h3>
|
|
<div class="content nopadding">
|
|
<div class="padding1020">
|
|
<?php echo $form->labelEx($model,'observaciones'); ?>
|
|
<div class="marginleft150">
|
|
<?php echo $form->textArea($model, 'observaciones', array('id'=>'wysiwyg', 'class'=>'lf')); ?>
|
|
<?php echo $form->error($model,'telefono_fijo', array('class'=>'errortext')); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<br clear="all" />
|
|
<div class="form_default">
|
|
<button type="submit"><?php echo $model->isNewRecord ? 'Crear' : 'Guardar'; ?></button>
|
|
</div>
|
|
<?php $this->endWidget(); ?>
|
|
|