Se retoca para que el eliminar capacidades desde cada sitio redirija bien a su sitio correspondiente

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_Intranet/trunk/src@90 e2b1556b-49f8-d141-9351-52d6861a72d9
This commit is contained in:
roberto 2011-06-06 17:41:05 +00:00
parent 0aebfcaef7
commit 08af5e477c
7 changed files with 38 additions and 27 deletions

View File

@ -151,7 +151,7 @@ echo '<tr>';
//CAMPO NOMBRE
echo '<td ';
if(in_array("1",$errores)) echo " class=\"errorcampo\"";
echo $en.' width="25%" textalign="right">'.$locale['100'].'<br><input type="text" name="nombre" value="'.$_POST['nombre'].'" size="20" maxlength="50"><br></td>';
echo $en.' width="25%" textalign="right">'.$locale['100'].'<br><input type="text" name="nombre" value="'.$_POST['nombre'].'" size="30" maxlength="50"><br></td>';
//CAMPO APELLIDOS
echo '<td ';
@ -161,10 +161,10 @@ echo ' width="25%" textalign="right">'.$locale['101'].'<br><input type="text" na
//CAMPO DNI
echo '<td ';
if(in_array("4",$errores)) echo " class=\"errorcampo\"";
echo ' width="25%" '.$edni.' textalign="right">'.$locale['1539'].'<br><input type="text" name="dni" value="'.$_POST['dni'].'" size="9" maxlength="9"></td>';
echo ' width="15%" '.$edni.' textalign="right">'.$locale['1539'].'<br><input type="text" name="dni" value="'.$_POST['dni'].'" size="15" maxlength="9"></td>';
//CAMPO FECHA NACIMIENTO
echo '<td width="25%" textalign="right">'.$locale['116'].'<br>';
echo '<td width="35%" textalign="right">'.$locale['116'].'<br>';
rellena_fecha_select($fecha_nacimiento, "nac");
//CAMPO SEXO
@ -181,21 +181,21 @@ echo '<tr>';
//CAMPO EMAIL
echo '<td ';
if(in_array("5",$errores)) echo ' class="errorcampo"';
echo ' width="25%">'.$locale['103'].'<br><input type="text" name="email" value="'.$_POST['email'].'" size="30" maxlength="50"></td>';
echo $locale['103'].'<br><input type="text" name="email" value="'.$_POST['email'].'" size="30" maxlength="50"></td>';
//CAMPO MOVIL
echo '<td ';
if(in_array("6",$errores)) echo " class=\"errorcampo\"";
echo ' width="25%" '.$etm.' textalign="right" width=20%>'.$locale['107'].'<br><input type="text" name="t_movil" value="'.$_POST['t_movil'].'" size="9" maxlength="9"></td>';
echo $etm.' textalign="right">'.$locale['107'].'<br><input type="text" name="t_movil" value="'.$_POST['t_movil'].'" size="20" maxlength="9"></td>';
//CAMPO TELEFONO
echo '<td ';
if(in_array("7",$errores)) echo " class=\"errorcampo\"";
echo ' width="25%" '.$etc.' textalign="right" width=20%>'.$locale['108'].'<br><input type="text" name="t_casa" value="'.$_POST['t_casa'].'" size="9" maxlength="9"></td>';
echo $etc.' textalign="right">'.$locale['108'].'<br><input type="text" name="t_casa" value="'.$_POST['t_casa'].'" size="15" maxlength="9"></td>';
//CAMPO LUGAR NACIMIENTO
echo '<td ';
echo ' width="25%" '.$ett.' textalign="right" width=20%>'.$locale['100117'].'<input type="text" name="lugar_nacimiento" value="'.$_POST['lugar_nacimiento'].'" size="50" maxlength="100"> </td>';
echo $ett.' textalign="right">'.$locale['100117'].'<br><input type="text" name="lugar_nacimiento" value="'.$_POST['lugar_nacimiento'].'" size="50" maxlength="100"> </td>';
echo '</tr>';

View File

@ -282,7 +282,7 @@ if (in_array("laborables", $mostrarDetalle)) { ?>
echo '<div id="capacidades" name="capacidades" class="encabezado">'.$locale['Capacidades001'].'</div>';
echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_candidato='.$persona->getValor("oid").'\', \'notes\')) window.location.reload()">';
$CapacidadesProfesionales = $persona->getCapacidadesProfesionales();
VerListaCapacidadesProfesionales($CapacidadesProfesionales);
VerListaCapacidadesProfesionales($CapacidadesProfesionales, "detalle_candidato");
?>

View File

@ -5,16 +5,21 @@ include("functions.php");
include_once("Objects/CapacidadProfesional.php");
$idCapacidad=$_GET['id'];
$idCandidato=$_GET['idCandidato'];
$origen=$_GET['origen'];
$capacidad = new CapacidadProfesional($idCapacidad,"candidato");
/* ELIMINAR_CAPACIDAD.PHP */
try{
$resultado=$capacidad->eliminar();
if($resultado){
header("Location: gestion_candidato.php?oid=".$idCandidato."#capacidades");
switch ($origen) {
case "gestion_candidato": header("Location: ".$origen.".php?oid=".$idCandidato."#capacidades"); break;
case "detalle_candidato": header("Location: ".$origen.".php?oid=".$idCandidato."#capacidades"); break;
case "lista_Candidatos": header("Location: lista_candidatos.php?order=nombre&modo=asc&byEstado=0"); break;
}
} else {
header("Location: gestion_candidato.php?oid=".$idCandidato)."#capacidades";
header("Location: gestion_candidato.php?oid=".$idCandidato."#capacidades");
}
} catch (Exception $e) {

View File

@ -495,7 +495,11 @@ TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
var strFeatures = "dialogWidth:" + w + "px;" + "dialogHeight:" + h + "px;" +
"dialogLeft:" + LeftPosition + "px;" + "dialogTop:" + TopPosition + "px;" +
"status:no;resizable:no;scroll:no;";
window.showModalDialog(mylink, windowname, strFeatures);
return true;
}
function prueba(){
//alert(opener.aa);
}

View File

@ -3,7 +3,7 @@
*/
function VerListaCapacidadesProfesionales($ListaCapacidadesProfesionales){
function VerListaCapacidadesProfesionales($ListaCapacidadesProfesionales, $Origen){
include LOCALE.LOCALESET."lenguaje.php";
if(count($ListaCapacidadesProfesionales->capacidad) > 0){
@ -22,8 +22,9 @@ include LOCALE.LOCALESET."lenguaje.php";
echo "<tr>";
echo "<td>";
echo "<a href=\"#\" onclick=\"if(popup('gestionCapacidadProfesional.php?id=".$campos["id"]."', 'notes')) window.location.reload()\"><img src=\"css/edit.png\" title=". $locale['Capacidades009'] ."\"/></a>";
echo "&nbsp;&nbsp;&nbsp;";
echo "<a href=\"#\" onclick=\"eliminarCapacidad('eliminarCapacidadProfesional.php?id=".$campos["id"]."&idCandidato=".$campos["id_usuario"]."')\"><img src=\"css/eliminar.png\" title=\"".$locale['el']."\"/></a>";
echo "&nbsp;&nbsp;&nbsp;";
echo "<a href=\"#\" onclick=\"eliminarCapacidad('eliminarCapacidadProfesional.php?id=".$campos["id"]."&idCandidato=".$campos["id_usuario"]."&origen=".$Origen."')\"><img src=\"css/eliminar.png\" title=\"".$locale['el']."\"/></a>";
echo "</td>";
echo "<td>".$campos["perfil_tecnico"]."&nbsp;&nbsp;&nbsp;(".$campos["meses_tecnico"]."&nbsp;meses)</td>";

View File

@ -196,7 +196,7 @@ if($mensaje!=""){
}
echo $locale['286'];
$tipo="usuario";
echo "<form action=\"gestion_candidato.php?oid=".$candidato->getValor("oid")."\" method=\"POST\" enctype=\"multipart/form-data\">";
echo "<form action=\"gestion_candidato.php?oid=".$candidato->getValor("oid")."\" method=\"POST\" enctype=\"multipart/form-data\" target=\"_self\">";
echo "<input type=\"hidden\" name=\"action\" value=\"edit\" />";
///////////////////
//DATOS PERSONALES:
@ -209,7 +209,7 @@ echo '<tr>';
//CAMPO NOMBRE
echo '<td ';
if(in_array("1",$errores)) echo " class=\"errorcampo\"";
echo $en.' width="25%" textalign="right">'.$locale['100'].'<br><input type="text" name="nombre" value="'.$candidato->getValor("nombre").'" size="20" maxlength="50"><br></td>';
echo $en.' width="25%" textalign="right">'.$locale['100'].'<br><input type="text" name="nombre" value="'.$candidato->getValor("nombre").'" size="30" maxlength="50"><br></td>';
//CAMPO APELLIDOS
echo '<td ';
@ -219,10 +219,10 @@ echo ' width="25%" textalign="right">'.$locale['101'].'<br><input type="text" na
//CAMPO DNI
echo '<td ';
if(in_array("4",$errores)) echo " class=\"errorcampo\"";
echo ' width="25%" '.$edni.' textalign="right">'.$locale['1539'].'<br><input type="text" name="dni" value="'.$candidato->getValor("dni").'" size="9" maxlength="9"></td>';
echo ' width="15%" '.$edni.' textalign="right">'.$locale['1539'].'<br><input type="text" name="dni" value="'.$candidato->getValor("dni").'" size="15" maxlength="9"></td>';
//CAMPO FECHA NACIMIENTO
echo '<td width="25%" textalign="right">'.$locale['116'].'<br>';
echo '<td width="35%" textalign="right">'.$locale['116'].'<br>';
rellena_fecha_select($candidato->getValor("fecha_nacimiento"), "nac");
//CAMPO SEXO
@ -238,21 +238,21 @@ echo '<tr>';
//CAMPO EMAIL
echo '<td ';
if(in_array("5",$errores)) echo ' class="errorcampo"';
echo ' width="25%">'.$locale['103'].'<br><input type="text" name="email" value="'.$candidato->getValor("email").'" size="30" maxlength="50"></td>';
echo ' >'.$locale['103'].'<br><input type="text" name="email" value="'.$candidato->getValor("email").'" size="30" maxlength="50"></td>';
//CAMPO MOVIL
echo '<td ';
if(in_array("6",$errores)) echo " class=\"errorcampo\"";
echo ' width="25%" '.$etm.' textalign="right" width=20%>'.$locale['107'].'<br><input type="text" name="t_movil" value="'.$candidato->getValor("t_movil").'" size="9" maxlength="9"></td>';
echo $etm.' textalign="right">'.$locale['107'].'<br><input type="text" name="t_movil" value="'.$candidato->getValor("t_movil").'" size="15" maxlength="9"></td>';
//CAMPO TELEFONO
echo '<td ';
if(in_array("7",$errores)) echo " class=\"errorcampo\"";
echo ' width="25%" '.$etc.' textalign="right" width=20%>'.$locale['108'].'<br><input type="text" name="t_casa" value="'.$candidato->getValor("t_casa").'" size="9" maxlength="9"></td>';
echo $etc.' textalign="right">'.$locale['108'].'<br><input type="text" name="t_casa" value="'.$candidato->getValor("t_casa").'" size="15" maxlength="9"></td>';
//CAMPO LUGAR NACIMIENTO
echo '<td ';
echo ' width="25%" '.$ett.' textalign="right" width=20%>'.$locale['100117'].'<input type="text" name="lugar_nacimiento" value="'.$candidato->getValor("lugar_nacimiento").'" size="50" maxlength="100"> </td>';
echo $ett.' textalign="right">'.$locale['100117'].'<br><input type="text" name="lugar_nacimiento" value="'.$candidato->getValor("lugar_nacimiento").'" size="50" maxlength="100"> </td>';
echo '</tr>';
echo '<tr>';
@ -430,7 +430,7 @@ foreach ($localidadesDeseadas as $nombre =>$valor) {
echo $nombre." <a href=\"gestion_candidato.php?oid=".$candidato->getValor("oid")."&action=dellLocDes&id=".$valor."\">Borrar</a><br />";
}
echo $html->listaSelect("provincias","oid","id","provincia_deseada",array("",$locale['ns']),$candidato->getProvinciasDeseadas(),true,true,"7");
echo '&nbsp;&nbsp;<textarea name="observaciones_prov_deseada" rows="6" cols="30" style="overflow: auto;">'.$_POST['observaciones_prov_deseada'].'</textarea>';
echo '&nbsp;&nbsp;<textarea name="observaciones_prov_deseada" rows="6" cols="30" style="overflow: auto;">'.$candidato->getValor("observaciones_prov_deseada").'</textarea>';
echo '</td>';
// CAMPO PROVINCIA NO DESEADA
@ -443,7 +443,7 @@ foreach ($localidadesNoDeseadas as $nombre =>$valor) {
echo $nombre." <a href=\"gestion_candidato.php?oid=".$candidato->getValor("oid")."&action=dellLocNoDes&id=".$valor."\">Borrar</a><br />";
}
echo $html->listaSelect("provincias","oid","id","provincias_no_deseadas",array("",$locale['ns']),$candidato->getProvinciasNoDeseadas(),true,true,"7");
echo '&nbsp;&nbsp;<textarea name="observaciones_prov_nodeseada" rows="6" cols="30" style="overflow: auto;">'.$_POST['observaciones_prov_nodeseada'].'</textarea>';
echo '&nbsp;&nbsp;<textarea name="observaciones_prov_nodeseada" rows="6" cols="30" style="overflow: auto;">'.$candidato->getValor("observaciones_prov_nodeseada").'</textarea>';
echo '</td>';
echo '<td></td>';
@ -460,7 +460,7 @@ echo '</tr></table>';
echo '<div id="capacidades" name="capacidades" class="encabezado">'.$locale['Capacidades001'].'</div>';
echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_candidato='.$candidato->getValor("oid").'\', \'notes\')) window.location.reload()">';
$CapacidadesProfesionales = $candidato->getCapacidadesProfesionales();
VerListaCapacidadesProfesionales($CapacidadesProfesionales);
VerListaCapacidadesProfesionales($CapacidadesProfesionales, "gestion_candidato");

View File

@ -168,7 +168,8 @@ echo '<div id="ContTabul">';
//echo '<input language="javascript" type="button" value="'.$locale['Capacidades003'].'" class="button" onclick="if(popup(\'addCapacidadProfesional.php?id_candidato='.$persona->getValor("oid").'\', \'notes\')) window.location.reload()">';
//$capacidad = new CapacidadProfesional($pedidoAct->getValor("oid"),"candidato");
$CapacidadesProfesionales = $pedidoAct->getCapacidadesProfesionales();
VerListaCapacidadesProfesionales($CapacidadesProfesionales);
VerListaCapacidadesProfesionales($CapacidadesProfesionales, "lista_Candidatos");
?>
</td>