File: /home/undanet/www/PortalEmpleo/src/Views/DetalleCandidatoView.php
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<div class="lan-exp-popup" id="lan-exp-popup">
<div class="content-lan-exp-popup">
<svg xmlns="http://www.w3.org/2000/svg" width="9" height="24" viewBox="0 0 9 24">
<text id="x" transform="translate(0 19)" font-size="18" font-family="SegoeUI, Segoe UI"><tspan x="0" y="0">x</tspan></text>
</svg>
<h3><?php echo __('Now you can complete the Languages and Work Experience section', 'panoramic_child') ?></h3>
<button type="button" id="close-popup"><?php echo __('Accept', 'panoramic_child'); ?></button>
</div>
</div>
<script>
if(window.location.hash == '#frmCandidatoIdiomas') {
document.getElementById('lan-exp-popup').style.display = "flex";
}
let svg = document.querySelector('.lan-exp-popup svg')
svg.onclick = function(e){
document.getElementById('lan-exp-popup').style.display = "none";
}
document.getElementById('close-popup').onclick = function(e){
document.getElementById('lan-exp-popup').style.display = "none";
}
</script>
<?php
$root = get_site_url() . '/';
$rootwp = "";
//$docs = "file://../../docs";
if( pll_current_language() == 'en')
$lang = 'en_GB';
else
$lang = 'es_ES';
if(isset($_POST['codigoUsuarioWP']))
{
$_SESSION["codigoUsuarioWP"] = $_POST['codigoUsuarioWP'];
}
?>
<div class="wrap-content" ng-app="">
<?php if(isset($_GET['e'])) { ?>
<span class="error-notice" style="display: block;"><?php echo $_GET['e']; ?></span>
<?php } ?>
<form method="post" name="frmPerfilCandidato" id="frmPerfilCandidato" action="" enctype="multipart/form-data">
<table border="0">
<tbody>
<tr>
<td>
<?php echo '<label for="txtNombre">' . __('First Name', 'panoramic_child') . ':</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>';
echo '<input type="hidden" name="txtExiste" id="txtExiste" value="si">';
}
else
{
echo '<input type="text" name="txtNombre" id="txtNombre" required>';
echo '<input type="hidden" name="txtExiste" id="txtExiste" value="no">';
}
?>
</td>
</tr>
<tr>
<td>
<?php
echo '<label for="txtApellido1">' . __('Last Name', 'panoramic_child') . ':</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
echo '<label for="txtApellido2">' . __('Last Name 2', 'panoramic_child') . ':</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
echo '<label for="txtDocumento">' . __('Document ID', 'panoramic_child') . ':</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
echo '<label for="dtFechaNacimiento">' . __('Birth Date', 'panoramic_child') . ':</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("Y-m-d") . '" required>';
}
?>
</td>
</tr>
<tr>
<td>
<?php
echo '<label for="slctArea">' . __('Area/Section where you wish to work inside the CLPU', 'panoramic_child') . ':</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
echo '<label for="slctTitulacion">' . __('Academic Qualifications', 'panoramic_child') . ':</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
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
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', 'panoramic_child') . '</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="' . __('Describe it', 'panoramic_child') . '" value="' . $data['candidato']->getDescripcionmaster() . '">';
}
else
{
echo '<input type="text" name="txtMaster" id="txtMaster" placeholder="' . __('Describe it', 'panoramic_child') . '..." hidden="true">';
}
?>
</td>
</tr>
<tr>
<td>
<?php
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', 'panoramic_child') . '</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="' . __('Describe it', 'panoramic_child') . '..." value="' . $data['candidato']->getDescripcionespecializacion() . '">';
}
else
{
echo '<input type="text" name="txtEspecializacion" id="txtEspecializacion" placeholder="' . __('Describe it', 'panoramic_child') . '..." hidden="true">';
}
?>
</td>
</tr>
<tr>
<td>
<?php
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>';
}
echo '<td><div name="flCVError" id ="flCVError" hidden="true" class="red">' . __('Admitted files', 'panoramic_child') . ' .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
echo '<label for="flCartaPresentacion">' . __('Cover Letter', 'panoramic_child') . ' <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>';
}
echo '<td><div name="flCartaPresentacionError" id ="flCartaPresentacionError" hidden="true" class="red">' . __('Admitted files', 'panoramic_child') . ' .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
echo '<label for="txtMotivacion">' . __('Describe your motivation to work in the CLPU', 'panoramic_child') . ':</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
echo '<label>' . __('Have you been involved in any selection process for the CLPU previously?', 'panoramic_child') . '</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
echo '<label>' . __('How did you meet us?', 'panoramic_child') . '</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">';
}
echo '<label for="chkRecibirEmails">' . __('I would like to receive information about future job calls for the CLPU by email', 'panoramic_child') . '</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
/*Do you want to update profile?*/
echo '<input type="button" id="btnVolver" name="btnVolver" value="' . __('Back', 'panoramic_child') . '" onClick="listar();">';
echo '<input type="button" name="accionCandidato" value="' . __('Update Profile', 'panoramic_child') . '" class="margenes_laterales_4" onClick="fncsubmit(\'' . __('Do you want to update profile?', 'panoramic_child') . '\',this);">';
if(isset($data['candidato']) && is_object($data['candidato'])) {
if( $lang == 'en_GB') {
if(isset($_GET['c'])){
/*$url_return = $root . '/en/call-details/?id=' . $_GET['c'] . '/';*/
$url_return = $root . '/job-opportunities/';
} else {
$url_return = $root . '/job-opportunities/';
}
} else {
if(isset($_GET['c'])){
/*$url_return = $root . '/detalle-de-convocatoria/?id=' . $_GET['c'] . '/';*/
$url_return = $root . '/ofertas-de-trabajo/';
} else {
$url_return = $root . '/ofertas-de-trabajo/';
}
}
echo '<input type="button" value="' . __('Sign up for job offer', 'panoramic_child') . '" class="" onClick="javascript:location.href=\'' . $url_return . '\'">';
}
?>
</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'];
}
?>
<?php if(isset($data['candidato']) && is_object($data['candidato'])) { ?>
<section id="idiomas" name ="idiomas">
<br><br><br>
<form method="post" name="frmCandidatoIdiomas" id="frmCandidatoIdiomas" action="<?php echo current_location(); ?>" enctype="multipart/form-data">
<?php
echo '<h1>' . __('Languages', 'panoramic_child') . '</h1>';
?>
<table border=0>
<tbody>
<tr>
<td>
<?php
echo '' . __('Languages', 'panoramic_child') . '';
$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
echo '' . __('Level', 'panoramic_child') . '';
$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>';
}
echo '<input type="button" name="btnaccionCandidatoIdioma" value="' . __('Add', 'panoramic_child') . '" class="margenes_laterales_4" onClick="fnclanguagesubmit(this);">';
?>
</td>
</tr>
<tr>
<td colspan=3>
<?php
echo '<input type="text" name="txtOtroIdioma" id="txtOtroIdioma" placeholder="' . __('Type language', 'panoramic_child') . '..." hidden disabled>';
?>
</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
{
echo '<tr><td><label class="margenes_laterales_4 color_original_reducido">' . __('There is not languages inserted, please add any', 'panoramic_child') . '...</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="<?php echo current_location(); ?>" enctype="multipart/form-data">
<?php
echo '<h1>' . __('Work Experience', 'panoramic_child') . '</h1>';
?>
<table border=0>
<tbody>
<tr>
<td>
<?php
echo '<label>' . __('Profile', 'panoramic_child') . '</label>';
$nombreCombo = "Perfil";
include(__DIR__ . "/../Utils/combobox_loader.php");
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if ( isset($valSelected) ){
unset ($valSelected);
}
?>
</td>
<td>
<?php
echo '<label>' . __('Period', 'panoramic_child') . '</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>';
}
echo '<input type="button" name="btnaccionCandidatoPerfil" value="' . __('Add', 'panoramic_child') . '" 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
{
echo '<tr><td><label class="margenes_laterales_4 color_original_reducido">' . __('There is not experience inserted, please add any', 'panoramic_child') . '...</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>
<?php } ?>