Commit 04666a476beb2ec8e29b417a4004d01c6dd1a062
1 parent
c5cda4c84c
Exists in
master
colocado los tutores como no obligatorio y deben escojerse si y solo si el trabajo es fuera de ubv
Showing
2 changed files
with
28 additions
and
13 deletions
Show diff stats
app/Resources/views/solicitudes/ascenso.html.twig
@@ -141,6 +141,13 @@ | @@ -141,6 +141,13 @@ | ||
141 | $('#ascenso_tipoTrabajoInvestigacion').click(function() { | 141 | $('#ascenso_tipoTrabajoInvestigacion').click(function() { |
142 | 142 | ||
143 | $('.esc_oposicion')[this.checked ? "show" : "hide"](); | 143 | $('.esc_oposicion')[this.checked ? "show" : "hide"](); |
144 | + | ||
145 | + if($('#ascenso_tipoTrabajoInvestigacion').prop('checked') == true){ | ||
146 | + | ||
147 | + $("#ascenso_tutores_ascenso_chosen").show(); | ||
148 | + }else{ | ||
149 | + $("#ascenso_tutores_ascenso_chosen").hide(); | ||
150 | + } | ||
144 | 151 | ||
145 | }); | 152 | }); |
146 | 153 | ||
@@ -223,6 +230,12 @@ | @@ -223,6 +230,12 @@ | ||
223 | }); | 230 | }); |
224 | }); | 231 | }); |
225 | 232 | ||
233 | + $("#ascenso_tutores_ascenso").on("chosen:ready", function() { | ||
234 | + $("#ascenso_tutores_ascenso_chosen").hide(); | ||
235 | + alert("hidden"); | ||
236 | + }); | ||
237 | + | ||
238 | + | ||
226 | $("#ascenso_tutores_ascenso").chosen({ | 239 | $("#ascenso_tutores_ascenso").chosen({ |
227 | no_results_text: "<a data-toggle='modal' data-target='#buscarTutores' href='#'>Tutor no registrado, click aquí para registrar!</a>", | 240 | no_results_text: "<a data-toggle='modal' data-target='#buscarTutores' href='#'>Tutor no registrado, click aquí para registrar!</a>", |
228 | max_selected_options: 6 | 241 | max_selected_options: 6 |
src/AppBundle/Form/AscensoType.php
@@ -107,19 +107,7 @@ class AscensoType extends AbstractType | @@ -107,19 +107,7 @@ class AscensoType extends AbstractType | ||
107 | 'required' => true, | 107 | 'required' => true, |
108 | 108 | ||
109 | )) | 109 | )) |
110 | - | ||
111 | - | ||
112 | - ->add('tutores_ascenso', EntityType::class, array( | ||
113 | - 'placeholder' => 'Añadir Tutores...', | ||
114 | - 'class' => 'AppBundle:TutoresAscenso', | ||
115 | - 'multiple' => true, | ||
116 | - 'group_by' => 'institucion', | ||
117 | - /*'attr' => array( | ||
118 | - 'disabled' => 'true', | ||
119 | - )*/ | ||
120 | - )) | ||
121 | - | ||
122 | - | 110 | + |
123 | 111 | ||
124 | ->add('investigacion', FileType::class, array( | 112 | ->add('investigacion', FileType::class, array( |
125 | 'label' => 'Digital Trabajo de investigación / Tesis', | 113 | 'label' => 'Digital Trabajo de investigación / Tesis', |
@@ -144,6 +132,20 @@ class AscensoType extends AbstractType | @@ -144,6 +132,20 @@ class AscensoType extends AbstractType | ||
144 | 'label' => 'Si su trabajo de investigación es TESIS, responda ¿Fue realizado fuera de la UBV?', | 132 | 'label' => 'Si su trabajo de investigación es TESIS, responda ¿Fue realizado fuera de la UBV?', |
145 | 'required' => false, | 133 | 'required' => false, |
146 | )) | 134 | )) |
135 | + | ||
136 | + ->add('tutores_ascenso', EntityType::class, array( | ||
137 | + 'placeholder' => 'Añadir Posibles Jurados...', | ||
138 | + 'class' => 'AppBundle:TutoresAscenso', | ||
139 | + 'required' => false, | ||
140 | + 'label' => 'Asigne Posibles Jurados', | ||
141 | + 'label_attr' => array( 'class' => 'esc_oposicion'), | ||
142 | + 'multiple' => true, | ||
143 | + 'group_by' => 'institucion', | ||
144 | + | ||
145 | + /*'attr' => array( | ||
146 | + 'disabled' => 'true', | ||
147 | + )*/ | ||
148 | + )) | ||
147 | 149 | ||
148 | ->add('pertinencia', FileType::class, array( | 150 | ->add('pertinencia', FileType::class, array( |
149 | 'label' => 'Informe de Pertinencia', | 151 | 'label' => 'Informe de Pertinencia', |