diff --git a/app/Resources/views/solicitudes/ascenso.html.twig b/app/Resources/views/solicitudes/ascenso.html.twig index bd5096e..1c44d61 100644 --- a/app/Resources/views/solicitudes/ascenso.html.twig +++ b/app/Resources/views/solicitudes/ascenso.html.twig @@ -251,7 +251,6 @@ }); $("#ascenso_tutores_ascenso").on("chosen:ready", function() { - $("#ascenso_tutores_ascenso_chosen").hide(); if($('#ascenso_tipoTrabajoInvestigacion').val() === 'investigacion'){ $('.esc_investigacion').show(); $('.esc_tesis').hide(); @@ -260,10 +259,14 @@ $('.esc_investigacion').hide(); $('.esc_tesis').show(); if ($('#ascenso_tesisUbv').prop("checked")) { + $('.esc_pertinencia').show(); + $('.esc_investigacion').show(); $("#ascenso_tutores_ascenso_chosen").show(); }else{ $("#ascenso_tutores_ascenso_chosen").hide(); } + }else{ + $("#ascenso_tutores_ascenso_chosen").hide(); } }); diff --git a/src/AppBundle/Controller/AscensoController.php b/src/AppBundle/Controller/AscensoController.php index 94a39df..8dcaabc 100644 --- a/src/AppBundle/Controller/AscensoController.php +++ b/src/AppBundle/Controller/AscensoController.php @@ -130,7 +130,7 @@ class AscensoController extends Controller if ($form->isSubmitted()) { - //var_dump($form->get('tipoTrabajoInvestigacion')->getData()); exit; + //var_dump((!$form->get('tutores_ascenso')->getData()->toArray())); exit; if ($form->get('tipoTrabajoInvestigacion')->getData() === "tesis") { //var_dump($form); if (!$form->get('aprobacion')->getData()) { @@ -138,7 +138,7 @@ class AscensoController extends Controller } if ($form->get('tesisUbv')->getData()) { - if (!$form->get('tutores_ascenso')->getData()) { + if (!$form->get('tutores_ascenso')->getData()->toArray()) { $form->get('tutores_ascenso')->addError(new FormError('La tesis al ser fuera de la UBV debe postular seis(6) posibles jurados')); } @@ -152,7 +152,7 @@ class AscensoController extends Controller } }else if ($form->get('tipoTrabajoInvestigacion')->getData() === "investigacion"){ - if (!$form->get('tutores_ascenso')->getData()) { + if (!$form->get('tutores_ascenso')->getData()->toArray()) { $form->get('tutores_ascenso')->addError(new FormError('La tesis al ser fuera de la UBV debe postular seis(6) posibles jurados')); }