Commit 6f4724b0635dd1a1216ce1ea91b2b15e7f9a4598

Authored by Wilmer
1 parent e2c7430444
Exists in master

validado los posibles jurados en el ascenso

app/Resources/views/solicitudes/ascenso.html.twig
... ... @@ -251,7 +251,6 @@
251 251 });
252 252  
253 253 $("#ascenso_tutores_ascenso").on("chosen:ready", function() {
254   - $("#ascenso_tutores_ascenso_chosen").hide();
255 254 if($('#ascenso_tipoTrabajoInvestigacion').val() === 'investigacion'){
256 255 $('.esc_investigacion').show();
257 256 $('.esc_tesis').hide();
... ... @@ -260,10 +259,14 @@
260 259 $('.esc_investigacion').hide();
261 260 $('.esc_tesis').show();
262 261 if ($('#ascenso_tesisUbv').prop("checked")) {
  262 + $('.esc_pertinencia').show();
  263 + $('.esc_investigacion').show();
263 264 $("#ascenso_tutores_ascenso_chosen").show();
264 265 }else{
265 266 $("#ascenso_tutores_ascenso_chosen").hide();
266 267 }
  268 + }else{
  269 + $("#ascenso_tutores_ascenso_chosen").hide();
267 270 }
268 271 });
269 272  
... ...
src/AppBundle/Controller/AscensoController.php
... ... @@ -130,7 +130,7 @@ class AscensoController extends Controller
130 130  
131 131  
132 132 if ($form->isSubmitted()) {
133   - //var_dump($form->get('tipoTrabajoInvestigacion')->getData()); exit;
  133 + //var_dump((!$form->get('tutores_ascenso')->getData()->toArray())); exit;
134 134 if ($form->get('tipoTrabajoInvestigacion')->getData() === "tesis") {
135 135 //var_dump($form);
136 136 if (!$form->get('aprobacion')->getData()) {
... ... @@ -138,7 +138,7 @@ class AscensoController extends Controller
138 138 }
139 139  
140 140 if ($form->get('tesisUbv')->getData()) {
141   - if (!$form->get('tutores_ascenso')->getData()) {
  141 + if (!$form->get('tutores_ascenso')->getData()->toArray()) {
142 142 $form->get('tutores_ascenso')->addError(new FormError('La tesis al ser fuera de la UBV debe postular seis(6) posibles jurados'));
143 143 }
144 144  
... ... @@ -152,7 +152,7 @@ class AscensoController extends Controller
152 152 }
153 153  
154 154 }else if ($form->get('tipoTrabajoInvestigacion')->getData() === "investigacion"){
155   - if (!$form->get('tutores_ascenso')->getData()) {
  155 + if (!$form->get('tutores_ascenso')->getData()->toArray()) {
156 156 $form->get('tutores_ascenso')->addError(new FormError('La tesis al ser fuera de la UBV debe postular seis(6) posibles jurados'));
157 157 }
158 158  
... ...