File: //home/undanet/dump/data/PortalEmpleo/src/Views/DetalleCandidatoView.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Detalle de Candidato</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<?php
$_SERVER['HTTPS'] = $_SERVER['HTTPS'] == 'off' ? '' : $_SERVER['HTTPS'];
$root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';
$rootwp = "";
//$docs = "file://../../docs";
$lang = 'es';
if(isset($_GET['lang']))
{
switch($_GET['lang'])
{
case 'en':
case 'en_GB':
$lang = 'en';
break;
default:
$lang = 'es';
break;
}
}
if(isset($_POST['codigoUsuarioWP']))
{
$_SESSION["codigoUsuarioWP"] = $_POST['codigoUsuarioWP'];
}
?>
</head>
<body>
<div class="wrap-content" ng-app="">
<form method="post" name="frmPerfilCandidato" id="frmPerfilCandidato" action="" enctype="multipart/form-data">
<table border="0">
<tbody>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="txtNombre">First Name:</label><label class="red nomargin">*</label></td>';
}
else
{
echo '<label for="txtNombre">Nombre:</label><label class="red nomargin">*</label></td>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<input type="text" name="txtNombre" id="txtNombre" value="' . $data['candidato']->getNombre() . '" required>';
}
else
{
echo '<input type="text" name="txtNombre" id="txtNombre" required>';
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="txtApellido1">Last Name:</label><label class="red nomargin">*</label>';
}
else
{
echo '<label for="txtApellido1">Apellido 1:</label><label class="red nomargin">*</label>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<input type="text" name="txtApellido1" id="txtApellido1" value="' . $data['candidato']->getApellido1() . '" required>';
}
else
{
echo '<input type="text" name="txtApellido1" id="txtApellido1" required>';
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="txtApellido2">Last Name 2:</label>';
}
else
{
echo '<label for="txtApellido2">Apellido 2:</label>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<input type="text" name="txtApellido2" id="txtApellido2" value="' . $data['candidato']->getApellido2() . '">';
}
else
{
echo '<input type="text" name="txtApellido2" id="txtApellido2">';
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="txtDocumento">Document ID:</label><label class="red nomargin">*</label></td>';
}
else
{
echo '<label for="txtDocumento">Documento de Identificación:</label><label class="red nomargin">*</label></td>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<input type="text" name="txtDocumento" id="txtDocumento" value="' . $data['candidato']->getDocumento() . '" required>';
}
else
{
echo '<input type="text" name="txtDocumento" id="txtDocumento" required>';
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="dtFechaNacimiento">Birth Date:</label><label class="red nomargin">*</label>';
}
else
{
echo '<label for="dtFechaNacimiento">Fecha de Nacimiento:</label><label class="red nomargin">*</label>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<input type="hidden" name="dtFechaNacimiento" id="dtFechaNacimiento" value="' .
$data['candidato']->getFechanacimiento()->format('Y-m-d') . '" required>';
echo '<input type="date" name="dtFechaNacimiento" id="dtFechaNacimiento" value="' .
$data['candidato']->getFechanacimiento()->format('Y-m-d') . '">';
}
else
{
echo '<input type="date" name="dtFechaNacimiento" id="dtFechaNacimiento" value="'. date("d-m-Y\TH-i") . '" required>';
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="slctArea">Area/Section where you wish to work inside the CLPU:</label><label class="red nomargin">*</label>';
}
else
{
echo '<label for="slctArea">Área/Sección en la que desea trabajar dentro del CLPU:</label><label class="red nomargin">*</label>';
}
?>
</td>
<td>
<?php
$nombreCombo = "Area";
if(isset($data['candidato']) && is_object($data['candidato']))
{
$valSelected = ($data['candidato']->getCodigoarea())->getArea();
}
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="slctTitulacion">Academic Qualifications:</label><label class="red nomargin">*</label>';
}
else
{
echo '<label for="slctTitulacion">Titulación:</label><label class="red nomargin">*</label>';
}
?>
</td>
<td>
<?php
$nombreCombo = "Titulacion";
if(isset($data['candidato']) && is_object($data['candidato']))
{
$valSelected = ($data['candidato']->getCodigotitulacion())->getTitulacion();
}
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="slctMateria">Materia:</label><label class="red nomargin">*</label>';
}
else
{
echo '<label for="slctMateria">Materia:</label><label class="red nomargin">*</label>';
}
?>
</td>
<td>
<?php
$nombreCombo = "Materia";
if(isset($data['candidato']) && is_object($data['candidato']))
{
$valSelected = ($data['candidato']->getCodigomateria())->getMateria();
}
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
</tr>
<!-- Suprimido por lo hablado con Mª Sol
<tr>
<td>
<?php
/*if($lang=='en' || $lang=='en_GB')
{
echo '<label for="txtPuesto">Job:</label>';
}
else
{
echo '<label for="txtPuesto">Puesto:</label>';
}*/
?>
</td>
<td>
<?php
/*if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<textarea name="txtPuesto" id="txtPuesto">' . $data['candidato']->getPuesto() . '</textarea>';
}
else
{
echo '<textarea name="txtPuesto" id="txtPuesto"></textarea>';
}*/
?>
</td>
</tr>
-->
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>
<input type="checkbox" name="chkMaster" value="chkMaster" id="chkMaster" ';
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getDescripcionmaster()))>0)
{
echo ' checked ';
}
echo '> Master</label>';
}
else
{
echo '<label>
<input type="checkbox" name="chkMaster" value="chkMaster" id="chkMaster" ';
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getDescripcionmaster()))>0)
{
echo ' checked ';
}
echo '> Máster</label>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getDescripcionmaster()))>0)
{
echo '<input type="text" name="txtMaster" id="txtMaster" placeholder="Descripción" value="' . $data['candidato']->getDescripcionmaster() . '">';
}
else
{
if($lang=='en' || $lang=='en_GB')
{
echo '<input type="text" name="txtMaster" id="txtMaster" placeholder="Describe it..." hidden="true">';
}
else
{
echo '<input type="text" name="txtMaster" id="txtMaster" placeholder="Descripción..." hidden="true">';
}
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>
<input type="checkbox" name="chkEspecializacion" value="chkEspecializacion" id="chkEspecializacion" ';
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getDescripcionespecializacion()))>0)
{
echo ' checked ';
}
echo '> Expert on</label>';
}
else
{
echo '<label>
<input type="checkbox" name="chkEspecializacion" value="chkEspecializacion" id="chkEspecializacion" ';
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getDescripcionespecializacion()))>0)
{
echo ' checked ';
}
echo '> Especialización</label>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getDescripcionespecializacion()))>0)
{
echo '<input type="text" name="txtEspecializacion" id="txtEspecializacion" placeholder="Descripción" value="' . $data['candidato']->getDescripcionespecializacion() . '">';
}
else
{
if($lang=='en' || $lang=='en_GB')
{
echo '<input type="text" name="txtEspecializacion" id="txtEspecializacion" placeholder="Describe it..." hidden="true">';
}
else
{
echo '<input type="text" name="txtEspecializacion" id="txtEspecializacion" placeholder="Descripción..." hidden="true">';
}
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="flCV">Curriculum Vitae <small>(Max. 10MB)</small>:</label><label class="red nomargin">*</label></td>';
}
else
{
echo '<label for="flCV">Curriculum Vitae <small>(Max. 10MB)</small>:</label><label class="red nomargin">*</label></td>';
}
?>
</td>
<td>
<?php
echo '<table class="nomargin"><tbody><tr>';
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getRutacv()))>0)
{
echo '<td><input type="text" id="txtflCV" name="txtflCV" value="' . $data['candidato']->getRutacv() . '" hidden></td></tr><tr>';
//echo '<td><a href="../../portalempleo/src/Utils/download.php?id=' . $data['candidato']->getIdcandidato() . '&file=' . basename($data['candidato']->getRutacv()) . '" target="_blank">' . basename($data['candidato']->getRutacv()) . '</a></td></tr><tr>';
echo '<td><a href="' . $root . 'descarga/?id=' . ($data['candidato']->getCodigousuariowp())->getId() . '&file=' . basename($data['candidato']->getRutacv()) . '" target="_blank">' . basename($data['candidato']->getRutacv()) . '</a></td></tr><tr>';
echo '<td><input type="file" name="flCV" id="flCV" accept=".doc,.docx,application/msword,.pdf,application/pdf" value="' . $data['candidato']->getRutacv() . '"></td>';
}
else
{
echo '<td><input type="file" name="flCV" id="flCV" accept=".doc,.docx,application/msword,.pdf,application/pdf" required></td>';
}
if($lang=='en' || $lang=='en_GB')
{
echo '<td><div name="flCVError" id ="flCVError" hidden="true" class="red">Admitted files .doc, .docx y .pdf</div></td>';
}
else
{
echo '<td><div name="flCVError" id ="flCVError" hidden="true" class="red">Admite .doc, .docx y .pdf</div></td>';
}
echo '</tr></tbody></table>';
?>
</td>
</tr>
<script language="javascript">
var file = document.getElementById('flCV');
file.onchange = function(e) {
var fileError = document.getElementById('flCVError');
var ext = this.value.match(/\.([^\.]+)$/)[1];
switch (ext) {
case 'doc':
case 'docx':
case 'pdf':
//alert('Allowed');
fileError.hidden = true;
this.style.fontWeight="bold";
break;
default:
//alert('Not allowed');
this.value = '';
fileError.hidden = false;
this.style.fontWeight="unset";
break;
}
};
</script>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="flCartaPresentacion">Cover Letter <small>(Max. 10MB)</small>:</label></td>';
}
else
{
echo '<label for="flCartaPresentacion">Carta de Presentación <small>(Max. 10MB)</small>:</label></td>';
}
?>
</td>
<td>
<?php
echo '<table class="nomargin"><tbody><tr>';
if(isset($data['candidato']) && is_object($data['candidato']) && strlen(trim($data['candidato']->getRutacp()))>0)
{
echo '<td><input type="text" id="txtflCartaPresentacion" name="txtflCartaPresentacion" value="' . $data['candidato']->getRutacp() . '" hidden></td></tr><tr>';
echo '<td><a href="' . $root . 'descarga/?id=' . ($data['candidato']->getCodigousuariowp())->getId() . '&file=' . basename($data['candidato']->getRutacp()) . '" target="_blank">' . basename($data['candidato']->getRutacp()) . '</a></td></tr><tr>';
echo '<td><input type="file" name="flCartaPresentacion" id="flCartaPresentacion" accept=".doc,.docx,application/msword,.pdf,application/pdf" value="' . $data['candidato']->getRutacp() . '"></td>';
}
else
{
echo '<td><input type="file" name="flCartaPresentacion" id="flCartaPresentacion" accept=".doc,.docx,application/msword,.pdf,application/pdf"></td>';
}
if($lang=='en' || $lang=='en_GB')
{
echo '<td><div name="flCartaPresentacionError" id ="flCartaPresentacionError" hidden="true" class="red">Admitted files .doc, .docx y .pdf</div></td>';
}
else
{
echo '<td><div name="flCartaPresentacionError" id ="flCartaPresentacionError" hidden="true" class="red">Admite .doc, .docx y .pdf</div></td>';
}
echo '</tr></tbody></table>';
?>
</td>
</tr>
<script language="javascript">
var file = document.getElementById('flCartaPresentacion');
file.onchange = function(e) {
var fileError = document.getElementById('flCartaPresentacionError');
var ext = this.value.match(/\.([^\.]+)$/)[1];
switch (ext) {
case 'doc':
case 'docx':
case 'pdf':
//alert('Allowed');
fileError.hidden = true;
this.style.fontWeight="bold";
break;
default:
//alert('Not allowed');
fileError.hidden = false;
this.value = '';
this.style.fontWeight="unset";
break;
}
};
</script>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="txtMotivacion">Describe your motivation to work in the CLPU:</label>';
}
else
{
echo '<label for="txtMotivacion">Motivación para trabajar en CLPU:</label>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<textarea name="txtMotivacion" id="txtMotivacion">' . $data['candidato']->getMotivacion() . '</textarea>';
}
else
{
echo '<textarea name="txtMotivacion" id="txtMotivacion"></textarea>';
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>Have you been involved in any selection process for the CLPU previously?</label>';
}
else
{
echo '<label>¿Has participado anteriormente en otro proceso de selección en el CLPU?</label>';
}
?>
</td>
<td>
<?php
$cad_ES_checked = '<label><input type="radio" name="RdHasParticipado" value="1" id="RdHasParticipado1" checked>Sí </label><label><input type="radio" name="RdHasParticipado" value="0" id="RdHasParticipado0">No</label>';
$cad_EN_cheked = '<label><input type="radio" name="RdHasParticipado" value="1" id="RdHasParticipado1" checked>Yes </label><label><input type="radio" name="RdHasParticipado" value="0" id="RdHasParticipado0">No</label>';
$cad_ES_no_checked = '<label><input type="radio" name="RdHasParticipado" value="1" id="RdHasParticipado1">Sí </label><label><input type="radio" name="RdHasParticipado" value="0" id="RdHasParticipado0" checked>No</label>';
$cad_EN_no_cheked = '<label><input type="radio" name="RdHasParticipado" value="1" id="RdHasParticipado1">Yes </label><label><input type="radio" name="RdHasParticipado" value="0" id="RdHasParticipado0" checked>No</label>';
if(isset($data['candidato']) && is_object($data['candidato']))
{
if($data['candidato']->getHaparticipadoanteriormente())
{
if($lang=='en' || $lang=='en_GB')
{
echo $cad_EN_cheked;
}
else
{
echo $cad_ES_checked;
}
}
else
{
if($lang=='en' || $lang=='en_GB')
{
echo $cad_EN_no_cheked;
}
else
{
echo $cad_ES_no_checked;
}
}
}
else
{
if($lang=='en' || $lang=='en_GB')
{
echo $cad_EN_no_cheked;
}
else
{
echo $cad_ES_no_checked;
}
}
?>
</td>
</tr>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>How did you meet us?</label>';
}
else
{
echo '<label>¿Cómo nos has conocido?</label>';
}
?>
</td>
<td>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
$cad_Web = '<td><label><input type="radio" name="RdHasConocido" value="Web" id="RdHasConocido0">Web</label></td>';
$cad_Web_cheked = '<td><label><input type="radio" name="RdHasConocido" value="Web" id="RdHasConocido0" checked>Web</label></td>';
$cad_Twitter = '<td><label><input type="radio" name="RdHasConocido" value="Twitter" id="RdHasConocido2">Twitter</label></td>';
$cad_Twitter_cheked = '<td><label><input type="radio" name="RdHasConocido" value="Twitter" id="RdHasConocido2" checked>Twitter</label></td>';
$cad_LinkedIn = '<td><label><input type="radio" name="RdHasConocido" value="LinkedIn" id="RdHasConocido1">LinkedIn</label></td>';
$cad_LinkedIn_cheked = '<td><label><input type="radio" name="RdHasConocido" value="LinkedIn" id="RdHasConocido1" checked>LinkedIn</label></td>';
$cad_ES_Amigos = '<td><label><input type="radio" name="RdHasConocido" value="Conocidos" id="RdHasConocido3">Conocidos</label></td>';
$cad_ES_Amigos_checked = '<td><label><input type="radio" name="RdHasConocido" value="Conocidos" id="RdHasConocido3" checked>Conocidos</label></td>';
$cad_EN_Amigos = '<td><label><input type="radio" name="RdHasConocido" value="Conocidos" id="RdHasConocido3">Friends</label></td>';
$cad_EN_Amigos_checked = '<td><label><input type="radio" name="RdHasConocido" value="Conocidos" id="RdHasConocido3" checked>Friends</label></td>';
$cad_ES_Otros = '<td><label><input type="radio" name="RdHasConocido" value="Otros" id="RdHasConocido4">Otros</label></td>';
$cad_ES_Otros_checked = '<td><label><input type="radio" name="RdHasConocido" value="Otros" id="RdHasConocido4" checked>Otros</label></td>';
$cad_EN_Otros = '<td><label><input type="radio" name="RdHasConocido" value="Otros" id="RdHasConocido4">Others</label></td>';
$cad_EN_Otros_checked = '<td><label><input type="radio" name="RdHasConocido" value="Otros" id="RdHasConocido4" checked>Others</label></td>';
switch (trim($data['candidato']->getComoconocido())) {
case 'Web':
if($lang=='en' || $lang=='en_GB')
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web_cheked . $cad_EN_Amigos;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_EN_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Describe it..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
else
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web_cheked . $cad_ES_Amigos;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_ES_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Especifique..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
break;
case 'Twitter':
if($lang=='en' || $lang=='en_GB')
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_EN_Amigos;
echo '<tr>' . $cad_Twitter_cheked . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_EN_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Describe it..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
else
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_ES_Amigos;
echo '<tr>' . $cad_Twitter_cheked . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_ES_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Especifique..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
break;
case 'LinkedIn':
if($lang=='en' || $lang=='en_GB')
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_EN_Amigos;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn_cheked . '</tr>';
echo '<tr>' . $cad_EN_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Describe it..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
else
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_ES_Amigos;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn_cheked . '</tr>';
echo '<tr>' . $cad_ES_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Especifique..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
break;
case 'Conocidos':
if($lang=='en' || $lang=='en_GB')
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_EN_Amigos_checked;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_EN_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Describe it..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
else
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_ES_Amigos_checked;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_ES_Otros . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Especifique..." ></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
break;
default:
if($lang=='en' || $lang=='en_GB')
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_EN_Amigos;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_EN_Otros_checked . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" placeholder="Describe it..." value="' . trim($data['candidato']->getComoconocido()) . '" required></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
else
{
echo '<table class="nomargin"><tbody><tr>';
echo $cad_Web . $cad_ES_Amigos;
echo '<tr>' . $cad_Twitter . $cad_LinkedIn . '</tr>';
echo '<tr>' . $cad_ES_Otros_checked . '<td></td>' . '</tr>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" placeholder="Describe it..." value="' . trim($data['candidato']->getComoconocido()) . '" required></td><td></td></tr>';
echo '</tbody></table>';
echo '</tr></tbody></table>';
}
break;
}
}
else
{
if($lang=='en' || $lang=='en_GB')
{
echo '<table class="nomargin"><tbody>';
echo '<tr><td><label>
<input type="radio" name="RdHasConocido" value="Web" id="RdHasConocido0" checked>
Web</label></td><td><label>
<input type="radio" name="RdHasConocido" value="Conocidos" id="RdHasConocido3">
Friends</label></td></tr>';
echo '<tr><td><label>
<input type="radio" name="RdHasConocido" value="Twitter" id="RdHasConocido2">
Twitter</label></td><td><label>
<input type="radio" name="RdHasConocido" value="LinkedIn" id="RdHasConocido1">
LinkedIn</label></td></tr>';
echo '<tr><td><label>
<input type="radio" name="RdHasConocido" value="Otros" id="RdHasConocido4">
Others</label></td><td></td></tr></tbody></table>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Describe it..."></td><td></td></tr>';
echo '</tbody></table>';
}
else
{
echo '<table class="nomargin"><tbody>';
echo '<tr><td><label>
<input type="radio" name="RdHasConocido" value="Web" id="RdHasConocido0" checked>
Web</label></td><td><label>
<input type="radio" name="RdHasConocido" value="Conocidos" id="RdHasConocido3">
Conocidos</label></td></tr>';
echo '<tr><td><label>
<input type="radio" name="RdHasConocido" value="Twitter" id="RdHasConocido2">
Twitter</label></td><td><label>
<input type="radio" name="RdHasConocido" value="LinkedIn" id="RdHasConocido1">
LinkedIn</label></td></tr>';
echo '<tr><td><label>
<input type="radio" name="RdHasConocido" value="Otros" id="RdHasConocido4">
Otros</label></td><td></td></tr></tbody></table>';
echo '<table class="nomargin"><tbody><tr><td><input type="text" name="txtOtros" id="txtOtros" hidden="true" placeholder="Especifique..."></td><td></td></tr>';
echo '</tbody></table>';
}
}
?>
</td>
</tr>
<tr>
<td>
<?php
echo '<table><tbody><tr><td>';
if(isset($data['candidato']) && is_object($data['candidato']))
{
if($data['candidato']->getAceptarecibiremails() || $data['candidato']->getAceptarecibiremails()!= 0)
{
echo '<input type="checkbox" name="chkRecibirEmails" value="' . $data['candidato']->getAceptarecibiremails() . '" id="chkRecibirEmails" checked>';
}
else
{
echo '<input type="checkbox" name="chkRecibirEmails" value="' . $data['candidato']->getAceptarecibiremails() . '" id="chkRecibirEmails">';
}
}
else
{
echo '<input type="checkbox" name="chkRecibirEmails" value="true" id="chkRecibirEmails">';
}
if($lang=='en' || $lang=='en_GB')
{
echo '<label for="chkRecibirEmails">I would like to receive information about future job calls for the CLPU by email</label>';
}
else
{
echo '<label for="chkRecibirEmails">Deseo recibir información acerca de futuras convocatorias del CLPU por correo electrónico</label>';
}
echo '</td></tr></tbody></table>';
?>
</td>
<td>
</td>
</tr>
<tr>
<td><?php echo '<input type="text" id="accionCandidato" name="accionCandidato" value="" hidden>'; ?></td>
</tr>
</tbody>
</table>
</form>
<script language="javascript">
function listar() {
history.back();
}
function fncsubmit(value,object) {
if(confirm(value))
{
document.getElementById("accionCandidato").value = 'Actualizar';
document.getElementById("frmPerfilCandidato").submit();
}
}
</script>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<input type="button" id="btnVolver" name="btnVolver" value="Back" onClick="listar();">';
echo '<input type="button" name="accionCandidato" value="Update Profile" class="margenes_laterales_4" onClick="fncsubmit(\'Do you want to update profile?\',this);">';
}
else
{
echo '<input type="button" id="btnVolver" name="btnVolver" value="Volver" onClick="listar();">';
echo '<input type="button" name="accionCandidato" value="Actualizar Perfil" class="margenes_laterales_4" onClick="fncsubmit(\'¿Quieres actualizar este perfil?\',this);">';
}
?>
</div>
<script language="javascript">
var chk = document.getElementById('chkMaster');
var txtmaster = document.getElementById('txtMaster');
chk.addEventListener('change', function() {
if (this.checked) {
txtmaster.hidden = false;
}
else
{
txtmaster.hidden = true;
}
});
var chkEsp = document.getElementById('chkEspecializacion');
var txtEsp = document.getElementById('txtEspecializacion');
chkEsp.addEventListener('change', function() {
if (this.checked) {
txtEsp.hidden = false;
}
else
{
txtEsp.hidden = true;
}
});
var rd = document.getElementsByName('RdHasConocido');
var txtOtros = document.getElementById('txtOtros');
var i;
for (i = 0; i < rd.length; i++) {
if(i==rd.length-1)
{
rd[i].addEventListener('change', function() {
if (this.checked) {
txtOtros.hidden = false;
txtOtros.required = true;
}
else{
txtOtros.hidden = true;
txtOtros.required = false;
}
});
}
else
{
rd[i].addEventListener('change', function() {
if (this.checked) {
txtOtros.hidden = true;
txtOtros.required = false;
}
else{
txtOtros.hidden = false;
txtOtros.required = true;
}
});
}
}
</script>
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
$_SESSION["data"] = $data['candidato'];
}
else
{
session_destroy();
session_start();
$_SESSION["codigoUsuarioWP"] = $_POST['codigoUsuarioWP'];
}
?>
<section id="idiomas" name ="idiomas">
<br><br><br>
<form method="post" name="frmCandidatoIdiomas" id="frmCandidatoIdiomas" action="" enctype="multipart/form-data">
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<h1>Languages</h1>';
}
else
{
echo '<h1>Idiomas</h1>';
}
?>
<table border=0>
<tbody>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>Language</label>';
}
else
{
echo '<label>Idioma</label>';
}
$nombreCombo = "Idiomas";
/*if(isset($data['candidato']) && is_object($data['candidato']))
{
$valSelected = ($data['candidato']->getCodigoarea())->getArea();
}*/
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>Level</label>';
}
else
{
echo '<label>Nivel</label>';
}
$nombreCombo = "NivelIdioma";
/*if(isset($data['candidato']) && is_object($data['candidato']))
{
$valSelected = ($data['candidato']->getCodigoarea())->getArea();
}*/
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
<td style="vertical-align: bottom;">
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<input type="text" name="txtCdtIdioma" id="txtCdtIdioma" value="' . $data['candidato']->getIdcandidato() . '" hidden>';
}
if($lang=='en' || $lang=='en_GB')
{
echo '<input type="button" name="btnaccionCandidatoIdioma" value="Add" class="margenes_laterales_4" onClick="fnclanguagesubmit(this);">';
}
else
{
echo '<input type="button" name="btnaccionCandidatoIdioma" value="Añadir" class="margenes_laterales_4" onClick="fnclanguagesubmit(this);">';
}
?>
</td>
</tr>
<tr>
<td colspan=3>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<input type="text" name="txtOtroIdioma" id="txtOtroIdioma" placeholder="Type language..." hidden>';
}
else
{
echo '<input type="text" name="txtOtroIdioma" id="txtOtroIdioma" placeholder="Introducir idioma..." hidden>';
}
?>
</td>
</tr>
<tr>
<td colspan=3>
<br>
<table class="border_2">
<thead></thead>
<tbody>
<?php
if(isset($data['listaidiomas']) && ($data['listaidiomas'] != null))
{
echo '<tr><td><input type="text" name="txtIdioma" id="txtIdioma" value="" hidden></td></tr>';
foreach ($data['listaidiomas'] as $idiomas) {
if($idiomas->getOtroidioma() != null || strlen(trim($idiomas->getOtroidioma()))>0)
{
echo '<tr class="cebra"><td>' . $idiomas->getOtroidioma() . '</td><td>' . ($idiomas->getCodigonivelidioma())->getNivelidioma() . '</td><td><img id="btnaccionCandidatoIdioma" name="btnaccionCandidatoIdioma" value="' . $idiomas->getIdcandidatoidioma() . '" src="' . $root . $rootwp . 'PortalEmpleo/img/' . 'X_Icon_1_150x150.png' . '" width="25" height="25" alt="Quitar Idioma" class="link" id="attachImg" onclick ="fnclanguageremove(' . $idiomas->getIdcandidatoidioma() . ',this);"/></td></tr>';
}
else
{
echo '<tr class="cebra"><td>' . ($idiomas->getCodigoidiomas())->getIdioma() . '</td><td>' . ($idiomas->getCodigonivelidioma())->getNivelidioma() . '</td><td><img id="btnaccionCandidatoIdioma" name="btnaccionCandidatoIdioma" value="' . $idiomas->getIdcandidatoidioma() . '" src="' . $root . $rootwp . 'PortalEmpleo/img/' . 'X_Icon_1_150x150.png' . '" width="25" height="25" alt="Quitar Idioma" class="link" id="attachImg" onclick ="fnclanguageremove(' . $idiomas->getIdcandidatoidioma() . ',this);"/></td></tr>';
}
}
}
else
{
if($lang=='en' || $lang=='en_GB')
{
echo '<tr><td><label class="margenes_laterales_4 color_original_reducido">There is not languages inserted, please add any...</label></td></tr>';
}
else
{
echo '<tr><td><label class="margenes_laterales_4 color_original_reducido">Aún no has añadido idiomas, por favor introduce alguno...</label></td></tr>';
}
}
?>
</tbody>
</table>
<?php
/*if($lang=='en' || $lang=='en_GB')
{
echo '<input type="text" name="txtOtroIdioma" id="txtOtroIdioma" placeholder="Type language..." hidden>';
}
else
{
echo '<input type="text" name="txtOtroIdioma" id="txtOtroIdioma" placeholder="Introducir idioma..." hidden>';
}*/
?>
</td>
</tr>
<tr>
<td><?php echo '<input type="text" id="accionCandidatoIdioma" name="accionCandidato" value="" hidden>'; ?></td>
</tr>
<script language="javascript">
function fnclanguagesubmit(object) {
document.getElementById("accionCandidatoIdioma").value = 'AddIdioma';
document.getElementById("frmCandidatoIdiomas").submit();
}
function fnclanguageremove(id,object) {
document.getElementById("txtIdioma").value = object.getAttribute('value');
document.getElementById("accionCandidatoIdioma").value = 'QuitarIdioma';
document.getElementById("frmCandidatoIdiomas").submit();
}
var sctIdiomas = document.getElementById('slctIdiomas');
var txtOtroIdioma = document.getElementById('txtOtroIdioma');
sctIdiomas.addEventListener('change', function() {
if (this.value == 5) {
txtOtroIdioma.hidden = false;
txtOtroIdioma.required = true;
}
else
{
txtOtroIdioma.hidden = true;
txtOtroIdioma.required = false;
}
});
</script>
</tbody>
</table>
</form>
</section>
<section id="experiencia" name ="experiencia">
<br><br>
<form method="post" name="frmCandidatoPerfil" id="frmCandidatoPerfil" action="" enctype="multipart/form-data">
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<h1>Work Experience</h1>';
}
else
{
echo '<h1>Experiencia Laboral</h1>';
}
?>
<table border=0>
<tbody>
<tr>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>Profile</label>';
}
else
{
echo '<label>Perfil</label>';
}
$nombreCombo = "Perfil";
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
<td>
<?php
if($lang=='en' || $lang=='en_GB')
{
echo '<label>Period</label>';
}
else
{
echo '<label>Duración</label>';
}
$nombreCombo = "RangoExperiencia";
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
<td style="vertical-align: bottom;">
<?php
if(isset($data['candidato']) && is_object($data['candidato']))
{
echo '<input type="text" name="txtCdtPerfil" id="txtCdtPerfil" value="' . $data['candidato']->getIdcandidato() . '" hidden>';
}
if($lang=='en' || $lang=='en_GB')
{
echo '<input type="button" name="btnaccionCandidatoPerfil" value="Add" class="margenes_laterales_4" onClick="fnclexperiencesubmit(this);">';
}
else
{
echo '<input type="button" name="btnaccionCandidatoPerfil" value="Añadir" class="margenes_laterales_4" onClick="fnclexperiencesubmit(this);">';
}
?>
</td>
</tr>
<tr>
<td colspan=3>
<br>
<table class="border_2">
<thead></thead>
<tbody>
<?php
if(isset($data['listaperfiles']) && ($data['listaperfiles'] != null))
{
echo '<tr><td><input type="text" name="txtPerfil" id="txtPerfil" value="" hidden></td></tr>';
foreach ($data['listaperfiles'] as $perfiles) {
echo '<tr class="cebra"><td>' . ($perfiles->getCodigoperfil())->getPerfil() . '</td><td>' . ($perfiles->getCodigorangoexperiencia())->getRangoexperiencia() . '</td><td><img id="btnaccionCandidatoPerfil" name="btnaccionCandidatoPerfil" value="' . $perfiles->getIdcandidatoperfil() . '" src="' . $root . $rootwp . 'PortalEmpleo/img/' . 'X_Icon_1_150x150.png' . '" width="25" height="25" alt="Quitar Experiencia" class="link" id="attachImg" onclick ="fncexperienceremove(' . $perfiles->getIdcandidatoperfil() . ',this);"/></td></tr>';
}
}
else
{
if($lang=='en' || $lang=='en_GB')
{
echo '<tr><td><label class="margenes_laterales_4 color_original_reducido">There is not experience inserted, please add any...</label></td></tr>';
}
else
{
echo '<tr><td><label class="margenes_laterales_4 color_original_reducido">Aún no has añadido tú experiencia, por favor introduce alguna...</label></td></tr>';
}
}
?>
</tbody>
</table>
</td>
</tr>
<tr>
<td><?php echo '<input type="text" id="accionCandidatoPerfil" name="accionCandidato" value="" hidden>'; ?></td>
</tr>
<script language="javascript">
function fnclexperiencesubmit(object) {
document.getElementById("accionCandidatoPerfil").value = 'AddPerfil';
document.getElementById("frmCandidatoPerfil").submit();
}
function fncexperienceremove(id,object) {
document.getElementById("txtPerfil").value = object.getAttribute('value');
document.getElementById("accionCandidatoPerfil").value = 'QuitarPerfil';
document.getElementById("frmCandidatoPerfil").submit();
}
</script>
</tbody>
</table>
</form>
</section>
</body>
</html>