Commit 32adfbad7bf2100bdee5d1b4e3ea823b74d0494c
1 parent
901bbe6e0a
Exists in
master
creada la estructura, la entidad, el controlador, la vista y la plantilla para solicitar ascenso
Showing
6 changed files
with
1274 additions
and
1 deletions
Show diff stats
app/Resources/views/base_app.html.twig
@@ -59,7 +59,7 @@ | @@ -59,7 +59,7 @@ | ||
59 | </a> | 59 | </a> |
60 | <ul class="dropdown-menu"> | 60 | <ul class="dropdown-menu"> |
61 | <li><a href="{{ path('servicios_index') }}">Mis Servicios</a></li> | 61 | <li><a href="{{ path('servicios_index') }}">Mis Servicios</a></li> |
62 | - <li><a href="#">Solicitar Ascenso</a></li> | 62 | + <li><a href="{{ path('cea_solicitud_ascenso') }}">Solicitar Ascenso</a></li> |
63 | <li><a href="{{ path( 'cea_solicitudes_estado_academico' ) }}">Solicitar Estado Académico</a></li> | 63 | <li><a href="{{ path( 'cea_solicitudes_estado_academico' ) }}">Solicitar Estado Académico</a></li> |
64 | <li><a href="{{ path('cea_solicitudes_recocimiento_antiguedad') }}">Reconocimiento de Antiguedad</a></li> | 64 | <li><a href="{{ path('cea_solicitudes_recocimiento_antiguedad') }}">Reconocimiento de Antiguedad</a></li> |
65 | </ul> | 65 | </ul> |
app/Resources/views/solicitudes/ascenso.html.twig
@@ -0,0 +1,60 @@ | @@ -0,0 +1,60 @@ | ||
1 | +{% extends 'base_app.html.twig' %} | ||
2 | + | ||
3 | +{% block stylesheets %} | ||
4 | + {{ parent() }} | ||
5 | + | ||
6 | + <style> | ||
7 | + .esc_oposicion, .esc_asistente, .esc_agregado, .esc_asociado, .esc_titular{ | ||
8 | + display: none; | ||
9 | + } | ||
10 | + | ||
11 | + h1, h4{ | ||
12 | + margin:0; | ||
13 | + } | ||
14 | + | ||
15 | + .container{ | ||
16 | + margin-bottom: 0; | ||
17 | + } | ||
18 | + </style> | ||
19 | +{% endblock %} | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | +{% block body %} | ||
24 | + <div class="container"> | ||
25 | + <h4 class="alert alert-info"><i class="fa fa-info-circle"></i> | ||
26 | + Estimado (a) Docente | ||
27 | + <strong>{{app.user.idRolInstitucion.idRol.idPersona.primerNombre}} | ||
28 | + {{app.user.idRolInstitucion.idRol.idPersona.primerApellido}}</strong>, | ||
29 | + En este apartado usted podrá solicitar el ascenso al siguiente escalafón. | ||
30 | + | ||
31 | + </h4> | ||
32 | + </div> | ||
33 | + <div class="account-container register"> | ||
34 | + <div class="content clearfix"> | ||
35 | + <h1>Solicitud de Ascenso</h1> | ||
36 | + {% form_theme form 'bootstrap_3_layout.html.twig' %} | ||
37 | + {{ form_start(form) }} | ||
38 | + {{ form_widget(form) }} | ||
39 | + {{ form_end(form) }} | ||
40 | + </div> | ||
41 | + | ||
42 | + </div> | ||
43 | + | ||
44 | + | ||
45 | +{% endblock %} | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | +{% block javascripts %} | ||
51 | + {{ parent() }} | ||
52 | + <script type="text/javascript"> | ||
53 | + $('#ascenso_tipoTrabajoInvestigacion').click(function() { | ||
54 | + | ||
55 | + $('.esc_oposicion')[this.checked ? "show" : "hide"](); | ||
56 | + | ||
57 | + }); | ||
58 | + | ||
59 | + </script> | ||
60 | +{% endblock %} |
src/AppBundle/Controller/AscensoController.php
@@ -0,0 +1,173 @@ | @@ -0,0 +1,173 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: ubv-cipee | ||
5 | + * Date: 29/06/16 | ||
6 | + * Time: 09:08 AM | ||
7 | + */ | ||
8 | + | ||
9 | +namespace AppBundle\Controller; | ||
10 | + | ||
11 | + | ||
12 | +use Symfony\Component\HttpFoundation\File\UploadedFile; | ||
13 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | ||
14 | +use Symfony\Bundle\FrameworkBundle\Controller\Controller; | ||
15 | +use Symfony\Component\HttpFoundation\Request; | ||
16 | +use AppBundle\Entity\Ascenso; | ||
17 | +use AppBundle\Entity\DocenteEscala; | ||
18 | +use AppBundle\Entity\Memorando; | ||
19 | +use AppBundle\Entity\DocenteServicio; | ||
20 | +use AppBundle\Entity\AdscripcionPida; | ||
21 | + | ||
22 | + | ||
23 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | ||
24 | +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; | ||
25 | + | ||
26 | +class AscensoController extends Controller | ||
27 | +{ | ||
28 | + /** | ||
29 | + * @Route("/solicitud/ascenso", name="cea_solicitud_ascenso") | ||
30 | + */ | ||
31 | + public function ascensoAction(Request $request) | ||
32 | + { | ||
33 | + | ||
34 | + | ||
35 | + $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findOneBy( | ||
36 | + array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion()), | ||
37 | + array('id' => 'DESC') | ||
38 | + ); | ||
39 | + | ||
40 | + $siguiente = $escala->getIdEscala()->getId() + 1; | ||
41 | + $ascenso = new Ascenso(); | ||
42 | + if($siguiente < 6){ | ||
43 | + $nueva_escala = $this->getDoctrine()->getRepository('AppBundle:Escalafones')->findOneById($siguiente); | ||
44 | + } | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + $form = $this->createForm('AppBundle\Form\AscensoType'); | ||
51 | + $form->handleRequest($request); | ||
52 | + | ||
53 | + | ||
54 | + if ($form->isSubmitted() && $form->isValid()) { | ||
55 | + | ||
56 | + $ascenso = new Ascenso(); | ||
57 | + // $file stores the uploaded PDF file | ||
58 | + /** @var UploadedFile $constanciaTrabajo */ | ||
59 | + $constanciaTrabajo = $form->get('trabajo')->getData(); | ||
60 | + /** @var UploadedFile $constanciaPregrado */ | ||
61 | + $constanciaExpediente = $form->get('expediente')->getData(); | ||
62 | + /** @var UploadedFile $constanciaPregrado */ | ||
63 | + $constanciaPida = $form->get('pida')->getData(); | ||
64 | + /** @var UploadedFile $constanciaPregrado */ | ||
65 | + $constanciaNai = $form->get('nai')->getData(); | ||
66 | + /** @var UploadedFile $constanciaPregrado */ | ||
67 | + $constanciaInvestigacion = $form->get('investigacion')->getData(); | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + // Generate a unique name for the file before saving it | ||
72 | + $nombreTrabajo = md5(uniqid()).'.'.$constanciaTrabajo->guessExtension(); | ||
73 | + $nombreExpediente = md5(uniqid()).'.'.$constanciaExpediente->guessExtension(); | ||
74 | + $nombrePida = md5(uniqid()).'.'.$constanciaPida->guessExtension(); | ||
75 | + $nombreNai = md5(uniqid()).'.'.$constanciaNai->guessExtension(); | ||
76 | + $nombreInvestigacion = md5(uniqid()).'.'.$constanciaInvestigacion->guessExtension(); | ||
77 | + | ||
78 | + // Guardar el archivo y crear la miniatura de cada uno | ||
79 | + $constanciaTrabajo->move( | ||
80 | + $this->container->getParameter('ascenso_directory'), | ||
81 | + $nombreTrabajo | ||
82 | + ); | ||
83 | + thumbnail($nombreTrabajo, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | ||
84 | + | ||
85 | + | ||
86 | + $constanciaExpediente->move( | ||
87 | + $this->container->getParameter('ascenso_directory'), | ||
88 | + $nombreExpediente | ||
89 | + ); | ||
90 | + thumbnail($nombreExpediente, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | ||
91 | + | ||
92 | + $constanciaPida->move( | ||
93 | + $this->container->getParameter('ascenso_directory'), | ||
94 | + $nombrePida | ||
95 | + ); | ||
96 | + thumbnail($nombrePida, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | ||
97 | + | ||
98 | + | ||
99 | + $constanciaNai->move( | ||
100 | + $this->container->getParameter('ascenso_directory'), | ||
101 | + $nombreNai | ||
102 | + ); | ||
103 | + thumbnail($nombreNai, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | ||
104 | + | ||
105 | + if($form->get('investigacion')->getData()) { | ||
106 | + /** @var UploadedFile $constanciaPostgrado */ | ||
107 | + $constanciaInvestigacion = $form->get('investigacion')->getData(); | ||
108 | + $nombreInvestigacion = md5(uniqid()).'.'.$constanciaInvestigacion->guessExtension(); | ||
109 | + $constanciaInvestigacion->move( | ||
110 | + $this->container->getParameter('ascenso_directory'), | ||
111 | + $nombreInvestigacion | ||
112 | + ); | ||
113 | + thumbnail($nombreInvestigacion, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | ||
114 | + $ascenso->setInvestigacion($nombreInvestigacion); | ||
115 | + } | ||
116 | + $em = $this->getDoctrine()->getManager(); | ||
117 | + | ||
118 | + $ascenso->setTrabajo($nombreTrabajo); | ||
119 | + $ascenso->setExpediente($nombreExpediente); | ||
120 | + $ascenso->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
121 | + $ascenso->setPida($nombrePida); | ||
122 | + $ascenso->setNai($nombreNai); | ||
123 | + $ascenso->setInvestigacion($nombreInvestigacion); | ||
124 | + $ascenso->setTituloTrabajo($form->get('titulo_trabajo')->getData()); | ||
125 | + $ascenso->setIdEscalafones($nueva_escala); | ||
126 | + $ascenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(2)); | ||
127 | + | ||
128 | + | ||
129 | + if ($form->get('pertinencia')->getData()){ | ||
130 | + | ||
131 | + $constanciaPertinencia = $form->get('pertinencia')->getData(); | ||
132 | + $nombrePertinencia = md5(uniqid()).'.'.$constanciaPertinencia->guessExtension(); | ||
133 | + $constanciaPertinencia->move( | ||
134 | + $this->container->getParameter('ascenso_directory'), | ||
135 | + $nombrePertinencia | ||
136 | + ); | ||
137 | + thumbnail($nombrePertinencia, $this->container->getParameter('ascenso_directory'), $this->container->getParameter('ascenso_thumb_directory')); | ||
138 | + $ascenso->setPertinencia($nombrePertinencia); | ||
139 | + $ascenso->setIdLineaInvestigacion($form->get('lineas_investigacion')->getData()); | ||
140 | + | ||
141 | + } | ||
142 | + | ||
143 | + | ||
144 | + | ||
145 | + | ||
146 | + //Crear la solicitud de Servicio | ||
147 | + $servicios = new DocenteServicio(); | ||
148 | + | ||
149 | + $servicios->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
150 | + $servicios->setIdServicioCe($this->getDoctrine()->getRepository('AppBundle:ServiciosCe')->findOneById(5)); | ||
151 | + $servicios->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:estatus')->findOneById(2)); | ||
152 | + | ||
153 | + $em->persist($servicios); | ||
154 | + $em->persist($ascenso); | ||
155 | + | ||
156 | + $em->flush(); //guarda en la base de datos | ||
157 | + | ||
158 | + | ||
159 | + | ||
160 | + | ||
161 | + return $this->redirect($this->generateUrl('cea_index')); | ||
162 | + } | ||
163 | + | ||
164 | + return $this->render( | ||
165 | + 'solicitudes/ascenso.html.twig', | ||
166 | + array('form' => $form->createView()) | ||
167 | + ); | ||
168 | + } | ||
169 | + | ||
170 | + | ||
171 | + | ||
172 | +} | ||
173 | + |
src/AppBundle/Entity/Ascenso.php
@@ -0,0 +1,444 @@ | @@ -0,0 +1,444 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +namespace AppBundle\Entity; | ||
4 | + | ||
5 | +use Doctrine\ORM\Mapping as ORM; | ||
6 | +use Symfony\Component\Validator\Constraints as Assert; | ||
7 | + | ||
8 | + | ||
9 | +/** | ||
10 | + * Ascenso | ||
11 | + * | ||
12 | + * @ORM\Table(name="solicitud_ascenso", uniqueConstraints={@ORM\UniqueConstraint(name="ascenso_id_rol_institucion_docente_escalafones", columns={"id_rol_institucion", "id_escalafones"})}) | ||
13 | + * @ORM\Entity | ||
14 | + * @ORM\HasLifecycleCallbacks() | ||
15 | + */ | ||
16 | +class Ascenso | ||
17 | +{ | ||
18 | + | ||
19 | + /** | ||
20 | + * @var integer | ||
21 | + * | ||
22 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del Ascenso"}) | ||
23 | + * @ORM\Id | ||
24 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
25 | + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1) | ||
26 | + */ | ||
27 | + private $id; | ||
28 | + | ||
29 | + | ||
30 | + /** | ||
31 | + * @var \AppBundle\Entity\RolInstitucion | ||
32 | + * | ||
33 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion") | ||
34 | + * @ORM\JoinColumns({ | ||
35 | + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false) | ||
36 | + * }) | ||
37 | + */ | ||
38 | + protected $idRolInstitucion; | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + /** | ||
43 | + * @var \AppBundle\Entity\Escalafones | ||
44 | + * | ||
45 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Escalafones") | ||
46 | + * @ORM\JoinColumns({ | ||
47 | + * @ORM\JoinColumn(name="id_escalafones", referencedColumnName="id", nullable=false) | ||
48 | + * }) | ||
49 | + */ | ||
50 | + protected $idEscalafones; | ||
51 | + | ||
52 | + | ||
53 | + /** | ||
54 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la constancia de trabajo"}) | ||
55 | + * | ||
56 | + * @Assert\NotBlank(message="Debe cargar su constancia de Trabajo, es obligatoria.") | ||
57 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
58 | + */ | ||
59 | + private $trabajo; | ||
60 | + | ||
61 | + | ||
62 | + /** | ||
63 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la constancia de actualización de Expediente"}) | ||
64 | + * | ||
65 | + * @Assert\NotBlank(message="debe cargar su constancia de actualización de expediente, es obligatorio.") | ||
66 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
67 | + */ | ||
68 | + private $expediente; | ||
69 | + | ||
70 | + | ||
71 | + /** | ||
72 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la socialización del PIDA"}) | ||
73 | + * | ||
74 | + * @Assert\NotBlank(message="debe cargar su constancia de socializacion del PIDA, es obligatorio.") | ||
75 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
76 | + */ | ||
77 | + private $pida; | ||
78 | + | ||
79 | + /** | ||
80 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "digital del documento aval del nucleo academico de investigacion"}) | ||
81 | + * | ||
82 | + * @Assert\NotBlank(message="debe cargar su constnacia aval del NAI, es obligatorio.") | ||
83 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
84 | + */ | ||
85 | + private $nai; | ||
86 | + | ||
87 | + /** | ||
88 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "digital del documento de Trabajo de investigacion"}) | ||
89 | + * | ||
90 | + * @Assert\NotBlank(message="debe cargar su Trabajo de investigacion, es obligatorio.") | ||
91 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
92 | + */ | ||
93 | + private $investigacion; | ||
94 | + | ||
95 | + | ||
96 | + /** | ||
97 | + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicación del digital del informe de pertinencia en caso de ser tesis fuera de ubv"}) | ||
98 | + * | ||
99 | + * | ||
100 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
101 | + */ | ||
102 | + private $pertinencia; | ||
103 | + | ||
104 | + | ||
105 | + /** | ||
106 | + * @ORM\Column(name="titulo_trabajo", type="string", nullable=false, options={"comment" = "titulo del trabajo de investigacion"}) | ||
107 | + * @Assert\NotBlank(message="Titulo del Trabajo es obligatorio.") | ||
108 | + */ | ||
109 | + private $tituloTrabajo; | ||
110 | + | ||
111 | + | ||
112 | + /** | ||
113 | + * @ORM\Column(name="observacion", type="string", nullable=true, options={"comment" = "titulo del trabajo de investigacion"}) | ||
114 | + */ | ||
115 | + private $observacion; | ||
116 | + | ||
117 | + | ||
118 | + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de creación de la solicitud"}) | ||
119 | + | ||
120 | + */ | ||
121 | + | ||
122 | + private $fecha_creacion; | ||
123 | + | ||
124 | + | ||
125 | + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de actualizacion de la solicitud"}) | ||
126 | + | ||
127 | + */ | ||
128 | + | ||
129 | + private $fecha_ultima_actualizacion; | ||
130 | + | ||
131 | + /** | ||
132 | + * @var \AppBundle\Entity\Estatus | ||
133 | + * | ||
134 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Estatus") | ||
135 | + * @ORM\JoinColumns({ | ||
136 | + * @ORM\JoinColumn(name="id_estatus", referencedColumnName="id", nullable=false) | ||
137 | + * }) | ||
138 | + */ | ||
139 | + protected $idEstatus; | ||
140 | + | ||
141 | + | ||
142 | + /** | ||
143 | + * @ORM\PrePersist | ||
144 | + */ | ||
145 | + public function setFechaCreacion() | ||
146 | + { | ||
147 | + $this->fecha_creacion = new \DateTime(); | ||
148 | + $this->fecha_ultima_actualizacion = new \DateTime(); | ||
149 | + } | ||
150 | + | ||
151 | + public function getFechaCreacion() | ||
152 | + { | ||
153 | + return $this->fecha_creacion; | ||
154 | + | ||
155 | + } | ||
156 | + | ||
157 | + | ||
158 | + /** | ||
159 | + * @ORM\PreUpdate | ||
160 | + */ | ||
161 | + public function setFechaUltimaActualizacion() | ||
162 | + { | ||
163 | + $this->fecha_utlima_actualizacion = new \DateTime(); | ||
164 | + } | ||
165 | + | ||
166 | + | ||
167 | + | ||
168 | + /** | ||
169 | + * Get id | ||
170 | + * | ||
171 | + * @return integer | ||
172 | + */ | ||
173 | + public function getId() | ||
174 | + { | ||
175 | + return $this->id; | ||
176 | + } | ||
177 | + | ||
178 | + /** | ||
179 | + * Set trabajo | ||
180 | + * | ||
181 | + * @param string $trabajo | ||
182 | + * @return Ascenso | ||
183 | + */ | ||
184 | + public function setTrabajo($trabajo) | ||
185 | + { | ||
186 | + $this->trabajo = $trabajo; | ||
187 | + | ||
188 | + return $this; | ||
189 | + } | ||
190 | + | ||
191 | + /** | ||
192 | + * Get trabajo | ||
193 | + * | ||
194 | + * @return string | ||
195 | + */ | ||
196 | + public function getTrabajo() | ||
197 | + { | ||
198 | + return $this->trabajo; | ||
199 | + } | ||
200 | + | ||
201 | + /** | ||
202 | + * Set expediente | ||
203 | + * | ||
204 | + * @param string $expediente | ||
205 | + * @return Ascenso | ||
206 | + */ | ||
207 | + public function setExpediente($expediente) | ||
208 | + { | ||
209 | + $this->expediente = $expediente; | ||
210 | + | ||
211 | + return $this; | ||
212 | + } | ||
213 | + | ||
214 | + /** | ||
215 | + * Get expediente | ||
216 | + * | ||
217 | + * @return string | ||
218 | + */ | ||
219 | + public function getExpediente() | ||
220 | + { | ||
221 | + return $this->expediente; | ||
222 | + } | ||
223 | + | ||
224 | + /** | ||
225 | + * Set pida | ||
226 | + * | ||
227 | + * @param string $pida | ||
228 | + * @return Ascenso | ||
229 | + */ | ||
230 | + public function setPida($pida) | ||
231 | + { | ||
232 | + $this->pida = $pida; | ||
233 | + | ||
234 | + return $this; | ||
235 | + } | ||
236 | + | ||
237 | + /** | ||
238 | + * Get pida | ||
239 | + * | ||
240 | + * @return string | ||
241 | + */ | ||
242 | + public function getPida() | ||
243 | + { | ||
244 | + return $this->pida; | ||
245 | + } | ||
246 | + | ||
247 | + /** | ||
248 | + * Set nai | ||
249 | + * | ||
250 | + * @param string $nai | ||
251 | + * @return Ascenso | ||
252 | + */ | ||
253 | + public function setNai($nai) | ||
254 | + { | ||
255 | + $this->nai = $nai; | ||
256 | + | ||
257 | + return $this; | ||
258 | + } | ||
259 | + | ||
260 | + /** | ||
261 | + * Get nai | ||
262 | + * | ||
263 | + * @return string | ||
264 | + */ | ||
265 | + public function getNai() | ||
266 | + { | ||
267 | + return $this->nai; | ||
268 | + } | ||
269 | + | ||
270 | + /** | ||
271 | + * Set investigacion | ||
272 | + * | ||
273 | + * @param string $investigacion | ||
274 | + * @return Ascenso | ||
275 | + */ | ||
276 | + public function setInvestigacion($investigacion) | ||
277 | + { | ||
278 | + $this->investigacion = $investigacion; | ||
279 | + | ||
280 | + return $this; | ||
281 | + } | ||
282 | + | ||
283 | + /** | ||
284 | + * Get investigacion | ||
285 | + * | ||
286 | + * @return string | ||
287 | + */ | ||
288 | + public function getInvestigacion() | ||
289 | + { | ||
290 | + return $this->investigacion; | ||
291 | + } | ||
292 | + | ||
293 | + /** | ||
294 | + * Set pertinencia | ||
295 | + * | ||
296 | + * @param string $pertinencia | ||
297 | + * @return Ascenso | ||
298 | + */ | ||
299 | + public function setPertinencia($pertinencia) | ||
300 | + { | ||
301 | + $this->pertinencia = $pertinencia; | ||
302 | + | ||
303 | + return $this; | ||
304 | + } | ||
305 | + | ||
306 | + /** | ||
307 | + * Get pertinencia | ||
308 | + * | ||
309 | + * @return string | ||
310 | + */ | ||
311 | + public function getPertinencia() | ||
312 | + { | ||
313 | + return $this->pertinencia; | ||
314 | + } | ||
315 | + | ||
316 | + /** | ||
317 | + * Set tituloTrabajo | ||
318 | + * | ||
319 | + * @param string $tituloTrabajo | ||
320 | + * @return Ascenso | ||
321 | + */ | ||
322 | + public function setTituloTrabajo($tituloTrabajo) | ||
323 | + { | ||
324 | + $this->tituloTrabajo = $tituloTrabajo; | ||
325 | + | ||
326 | + return $this; | ||
327 | + } | ||
328 | + | ||
329 | + /** | ||
330 | + * Get tituloTrabajo | ||
331 | + * | ||
332 | + * @return string | ||
333 | + */ | ||
334 | + public function getTituloTrabajo() | ||
335 | + { | ||
336 | + return $this->tituloTrabajo; | ||
337 | + } | ||
338 | + | ||
339 | + /** | ||
340 | + * Set observacion | ||
341 | + * | ||
342 | + * @param string $observacion | ||
343 | + * @return Ascenso | ||
344 | + */ | ||
345 | + public function setObservacion($observacion) | ||
346 | + { | ||
347 | + $this->observacion = $observacion; | ||
348 | + | ||
349 | + return $this; | ||
350 | + } | ||
351 | + | ||
352 | + /** | ||
353 | + * Get observacion | ||
354 | + * | ||
355 | + * @return string | ||
356 | + */ | ||
357 | + public function getObservacion() | ||
358 | + { | ||
359 | + return $this->observacion; | ||
360 | + } | ||
361 | + | ||
362 | + /** | ||
363 | + * Get fecha_ultima_actualizacion | ||
364 | + * | ||
365 | + * @return \DateTime | ||
366 | + */ | ||
367 | + public function getFechaUltimaActualizacion() | ||
368 | + { | ||
369 | + return $this->fecha_ultima_actualizacion; | ||
370 | + } | ||
371 | + | ||
372 | + /** | ||
373 | + * Set idRolInstitucion | ||
374 | + * | ||
375 | + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion | ||
376 | + * @return Ascenso | ||
377 | + */ | ||
378 | + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion) | ||
379 | + { | ||
380 | + $this->idRolInstitucion = $idRolInstitucion; | ||
381 | + | ||
382 | + return $this; | ||
383 | + } | ||
384 | + | ||
385 | + /** | ||
386 | + * Get idRolInstitucion | ||
387 | + * | ||
388 | + * @return \AppBundle\Entity\RolInstitucion | ||
389 | + */ | ||
390 | + public function getIdRolInstitucion() | ||
391 | + { | ||
392 | + return $this->idRolInstitucion; | ||
393 | + } | ||
394 | + | ||
395 | + /** | ||
396 | + * Set idEstatus | ||
397 | + * | ||
398 | + * @param \AppBundle\Entity\Estatus $idEstatus | ||
399 | + * @return Ascenso | ||
400 | + */ | ||
401 | + public function setIdEstatus(\AppBundle\Entity\Estatus $idEstatus) | ||
402 | + { | ||
403 | + $this->idEstatus = $idEstatus; | ||
404 | + | ||
405 | + return $this; | ||
406 | + } | ||
407 | + | ||
408 | + /** | ||
409 | + * Get idEstatus | ||
410 | + * | ||
411 | + * @return \AppBundle\Entity\Estatus | ||
412 | + */ | ||
413 | + public function getIdEstatus() | ||
414 | + { | ||
415 | + return $this->idEstatus; | ||
416 | + } | ||
417 | + | ||
418 | + | ||
419 | + | ||
420 | + | ||
421 | + | ||
422 | + /** | ||
423 | + * Set idEscalafones | ||
424 | + * | ||
425 | + * @param \AppBundle\Entity\Escalafones $idEscalafones | ||
426 | + * @return Ascenso | ||
427 | + */ | ||
428 | + public function setIdEscalafones(\AppBundle\Entity\Escalafones $idEscalafones) | ||
429 | + { | ||
430 | + $this->idEscalafones = $idEscalafones; | ||
431 | + | ||
432 | + return $this; | ||
433 | + } | ||
434 | + | ||
435 | + /** | ||
436 | + * Get idEscalafones | ||
437 | + * | ||
438 | + * @return \AppBundle\Entity\Escalafones | ||
439 | + */ | ||
440 | + public function getIdEscalafones() | ||
441 | + { | ||
442 | + return $this->idEscalafones; | ||
443 | + } | ||
444 | +} |
src/AppBundle/Entity/Ascenso.php~
@@ -0,0 +1,421 @@ | @@ -0,0 +1,421 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +namespace AppBundle\Entity; | ||
4 | + | ||
5 | +use Doctrine\ORM\Mapping as ORM; | ||
6 | +use Symfony\Component\Validator\Constraints as Assert; | ||
7 | + | ||
8 | + | ||
9 | +/** | ||
10 | + * Ascenso | ||
11 | + * | ||
12 | + * @ORM\Table(name="solicitud_ascenso", uniqueConstraints={@ORM\UniqueConstraint(name="ascenso_id_rol_institucion_docente_escala", columns={"id_rol_institucion", "id_escala"})}) | ||
13 | + * @ORM\Entity | ||
14 | + * @ORM\HasLifecycleCallbacks() | ||
15 | + */ | ||
16 | +class Ascenso | ||
17 | +{ | ||
18 | + | ||
19 | + /** | ||
20 | + * @var integer | ||
21 | + * | ||
22 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del Ascenso"}) | ||
23 | + * @ORM\Id | ||
24 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
25 | + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1) | ||
26 | + */ | ||
27 | + private $id; | ||
28 | + | ||
29 | + | ||
30 | + /** | ||
31 | + * @var \AppBundle\Entity\RolInstitucion | ||
32 | + * | ||
33 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion") | ||
34 | + * @ORM\JoinColumns({ | ||
35 | + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false) | ||
36 | + * }) | ||
37 | + */ | ||
38 | + protected $idRolInstitucion; | ||
39 | + | ||
40 | + | ||
41 | + | ||
42 | + /** | ||
43 | + * @var \AppBundle\Entity\Escala | ||
44 | + * | ||
45 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Escalafones") | ||
46 | + * @ORM\JoinColumns({ | ||
47 | + * @ORM\JoinColumn(name="id_escala", referencedColumnName="id", nullable=false) | ||
48 | + * }) | ||
49 | + */ | ||
50 | + protected $idEscalafones; | ||
51 | + | ||
52 | + | ||
53 | + /** | ||
54 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la constancia de trabajo"}) | ||
55 | + * | ||
56 | + * @Assert\NotBlank(message="Debe cargar su constancia de Trabajo, es obligatoria.") | ||
57 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
58 | + */ | ||
59 | + private $trabajo; | ||
60 | + | ||
61 | + | ||
62 | + /** | ||
63 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la constancia de actualización de Expediente"}) | ||
64 | + * | ||
65 | + * @Assert\NotBlank(message="debe cargar su constancia de actualización de expediente, es obligatorio.") | ||
66 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
67 | + */ | ||
68 | + private $expediente; | ||
69 | + | ||
70 | + | ||
71 | + /** | ||
72 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la socialización del PIDA"}) | ||
73 | + * | ||
74 | + * @Assert\NotBlank(message="debe cargar su constancia de socializacion del PIDA, es obligatorio.") | ||
75 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
76 | + */ | ||
77 | + private $pida; | ||
78 | + | ||
79 | + /** | ||
80 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "digital del documento aval del nucleo academico de investigacion"}) | ||
81 | + * | ||
82 | + * @Assert\NotBlank(message="debe cargar su constnacia aval del NAI, es obligatorio.") | ||
83 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
84 | + */ | ||
85 | + private $nai; | ||
86 | + | ||
87 | + /** | ||
88 | + * @ORM\Column(type="string", nullable=false, options={"comment" = "digital del documento de Trabajo de investigacion"}) | ||
89 | + * | ||
90 | + * @Assert\NotBlank(message="debe cargar su Trabajo de investigacion, es obligatorio.") | ||
91 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
92 | + */ | ||
93 | + private $investigacion; | ||
94 | + | ||
95 | + | ||
96 | + /** | ||
97 | + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicación del digital del informe de pertinencia en caso de ser tesis fuera de ubv"}) | ||
98 | + * | ||
99 | + * | ||
100 | + * @Assert\File(mimeTypes={ "application/pdf" }) | ||
101 | + */ | ||
102 | + private $pertinencia; | ||
103 | + | ||
104 | + | ||
105 | + /** | ||
106 | + * @ORM\Column(name="titulo_trabajo", type="string", nullable=false, options={"comment" = "titulo del trabajo de investigacion"}) | ||
107 | + * @Assert\NotBlank(message="Titulo del Trabajo es obligatorio.") | ||
108 | + */ | ||
109 | + private $tituloTrabajo; | ||
110 | + | ||
111 | + | ||
112 | + /** | ||
113 | + * @ORM\Column(name="observacion", type="string", nullable=true, options={"comment" = "titulo del trabajo de investigacion"}) | ||
114 | + */ | ||
115 | + private $observacion; | ||
116 | + | ||
117 | + | ||
118 | + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de creación de la solicitud"}) | ||
119 | + | ||
120 | + */ | ||
121 | + | ||
122 | + private $fecha_creacion; | ||
123 | + | ||
124 | + | ||
125 | + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de actualizacion de la solicitud"}) | ||
126 | + | ||
127 | + */ | ||
128 | + | ||
129 | + private $fecha_ultima_actualizacion; | ||
130 | + | ||
131 | + /** | ||
132 | + * @var \AppBundle\Entity\Estatus | ||
133 | + * | ||
134 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Estatus") | ||
135 | + * @ORM\JoinColumns({ | ||
136 | + * @ORM\JoinColumn(name="id_estatus", referencedColumnName="id", nullable=false) | ||
137 | + * }) | ||
138 | + */ | ||
139 | + protected $idEstatus; | ||
140 | + | ||
141 | + | ||
142 | + /** | ||
143 | + * @ORM\PrePersist | ||
144 | + */ | ||
145 | + public function setFechaCreacion() | ||
146 | + { | ||
147 | + $this->fecha_creacion = new \DateTime(); | ||
148 | + $this->fecha_ultima_actualizacion = new \DateTime(); | ||
149 | + } | ||
150 | + | ||
151 | + public function getFechaCreacion() | ||
152 | + { | ||
153 | + return $this->fecha_creacion; | ||
154 | + | ||
155 | + } | ||
156 | + | ||
157 | + | ||
158 | + /** | ||
159 | + * @ORM\PreUpdate | ||
160 | + */ | ||
161 | + public function setFechaUltimaActualizacion() | ||
162 | + { | ||
163 | + $this->fecha_utlima_actualizacion = new \DateTime(); | ||
164 | + } | ||
165 | + | ||
166 | + | ||
167 | + | ||
168 | + /** | ||
169 | + * Get id | ||
170 | + * | ||
171 | + * @return integer | ||
172 | + */ | ||
173 | + public function getId() | ||
174 | + { | ||
175 | + return $this->id; | ||
176 | + } | ||
177 | + | ||
178 | + /** | ||
179 | + * Set trabajo | ||
180 | + * | ||
181 | + * @param string $trabajo | ||
182 | + * @return Ascenso | ||
183 | + */ | ||
184 | + public function setTrabajo($trabajo) | ||
185 | + { | ||
186 | + $this->trabajo = $trabajo; | ||
187 | + | ||
188 | + return $this; | ||
189 | + } | ||
190 | + | ||
191 | + /** | ||
192 | + * Get trabajo | ||
193 | + * | ||
194 | + * @return string | ||
195 | + */ | ||
196 | + public function getTrabajo() | ||
197 | + { | ||
198 | + return $this->trabajo; | ||
199 | + } | ||
200 | + | ||
201 | + /** | ||
202 | + * Set expediente | ||
203 | + * | ||
204 | + * @param string $expediente | ||
205 | + * @return Ascenso | ||
206 | + */ | ||
207 | + public function setExpediente($expediente) | ||
208 | + { | ||
209 | + $this->expediente = $expediente; | ||
210 | + | ||
211 | + return $this; | ||
212 | + } | ||
213 | + | ||
214 | + /** | ||
215 | + * Get expediente | ||
216 | + * | ||
217 | + * @return string | ||
218 | + */ | ||
219 | + public function getExpediente() | ||
220 | + { | ||
221 | + return $this->expediente; | ||
222 | + } | ||
223 | + | ||
224 | + /** | ||
225 | + * Set pida | ||
226 | + * | ||
227 | + * @param string $pida | ||
228 | + * @return Ascenso | ||
229 | + */ | ||
230 | + public function setPida($pida) | ||
231 | + { | ||
232 | + $this->pida = $pida; | ||
233 | + | ||
234 | + return $this; | ||
235 | + } | ||
236 | + | ||
237 | + /** | ||
238 | + * Get pida | ||
239 | + * | ||
240 | + * @return string | ||
241 | + */ | ||
242 | + public function getPida() | ||
243 | + { | ||
244 | + return $this->pida; | ||
245 | + } | ||
246 | + | ||
247 | + /** | ||
248 | + * Set nai | ||
249 | + * | ||
250 | + * @param string $nai | ||
251 | + * @return Ascenso | ||
252 | + */ | ||
253 | + public function setNai($nai) | ||
254 | + { | ||
255 | + $this->nai = $nai; | ||
256 | + | ||
257 | + return $this; | ||
258 | + } | ||
259 | + | ||
260 | + /** | ||
261 | + * Get nai | ||
262 | + * | ||
263 | + * @return string | ||
264 | + */ | ||
265 | + public function getNai() | ||
266 | + { | ||
267 | + return $this->nai; | ||
268 | + } | ||
269 | + | ||
270 | + /** | ||
271 | + * Set investigacion | ||
272 | + * | ||
273 | + * @param string $investigacion | ||
274 | + * @return Ascenso | ||
275 | + */ | ||
276 | + public function setInvestigacion($investigacion) | ||
277 | + { | ||
278 | + $this->investigacion = $investigacion; | ||
279 | + | ||
280 | + return $this; | ||
281 | + } | ||
282 | + | ||
283 | + /** | ||
284 | + * Get investigacion | ||
285 | + * | ||
286 | + * @return string | ||
287 | + */ | ||
288 | + public function getInvestigacion() | ||
289 | + { | ||
290 | + return $this->investigacion; | ||
291 | + } | ||
292 | + | ||
293 | + /** | ||
294 | + * Set pertinencia | ||
295 | + * | ||
296 | + * @param string $pertinencia | ||
297 | + * @return Ascenso | ||
298 | + */ | ||
299 | + public function setPertinencia($pertinencia) | ||
300 | + { | ||
301 | + $this->pertinencia = $pertinencia; | ||
302 | + | ||
303 | + return $this; | ||
304 | + } | ||
305 | + | ||
306 | + /** | ||
307 | + * Get pertinencia | ||
308 | + * | ||
309 | + * @return string | ||
310 | + */ | ||
311 | + public function getPertinencia() | ||
312 | + { | ||
313 | + return $this->pertinencia; | ||
314 | + } | ||
315 | + | ||
316 | + /** | ||
317 | + * Set tituloTrabajo | ||
318 | + * | ||
319 | + * @param string $tituloTrabajo | ||
320 | + * @return Ascenso | ||
321 | + */ | ||
322 | + public function setTituloTrabajo($tituloTrabajo) | ||
323 | + { | ||
324 | + $this->tituloTrabajo = $tituloTrabajo; | ||
325 | + | ||
326 | + return $this; | ||
327 | + } | ||
328 | + | ||
329 | + /** | ||
330 | + * Get tituloTrabajo | ||
331 | + * | ||
332 | + * @return string | ||
333 | + */ | ||
334 | + public function getTituloTrabajo() | ||
335 | + { | ||
336 | + return $this->tituloTrabajo; | ||
337 | + } | ||
338 | + | ||
339 | + /** | ||
340 | + * Set observacion | ||
341 | + * | ||
342 | + * @param string $observacion | ||
343 | + * @return Ascenso | ||
344 | + */ | ||
345 | + public function setObservacion($observacion) | ||
346 | + { | ||
347 | + $this->observacion = $observacion; | ||
348 | + | ||
349 | + return $this; | ||
350 | + } | ||
351 | + | ||
352 | + /** | ||
353 | + * Get observacion | ||
354 | + * | ||
355 | + * @return string | ||
356 | + */ | ||
357 | + public function getObservacion() | ||
358 | + { | ||
359 | + return $this->observacion; | ||
360 | + } | ||
361 | + | ||
362 | + /** | ||
363 | + * Get fecha_ultima_actualizacion | ||
364 | + * | ||
365 | + * @return \DateTime | ||
366 | + */ | ||
367 | + public function getFechaUltimaActualizacion() | ||
368 | + { | ||
369 | + return $this->fecha_ultima_actualizacion; | ||
370 | + } | ||
371 | + | ||
372 | + /** | ||
373 | + * Set idRolInstitucion | ||
374 | + * | ||
375 | + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion | ||
376 | + * @return Ascenso | ||
377 | + */ | ||
378 | + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion) | ||
379 | + { | ||
380 | + $this->idRolInstitucion = $idRolInstitucion; | ||
381 | + | ||
382 | + return $this; | ||
383 | + } | ||
384 | + | ||
385 | + /** | ||
386 | + * Get idRolInstitucion | ||
387 | + * | ||
388 | + * @return \AppBundle\Entity\RolInstitucion | ||
389 | + */ | ||
390 | + public function getIdRolInstitucion() | ||
391 | + { | ||
392 | + return $this->idRolInstitucion; | ||
393 | + } | ||
394 | + | ||
395 | + /** | ||
396 | + * Set idEstatus | ||
397 | + * | ||
398 | + * @param \AppBundle\Entity\Estatus $idEstatus | ||
399 | + * @return Ascenso | ||
400 | + */ | ||
401 | + public function setIdEstatus(\AppBundle\Entity\Estatus $idEstatus) | ||
402 | + { | ||
403 | + $this->idEstatus = $idEstatus; | ||
404 | + | ||
405 | + return $this; | ||
406 | + } | ||
407 | + | ||
408 | + /** | ||
409 | + * Get idEstatus | ||
410 | + * | ||
411 | + * @return \AppBundle\Entity\Estatus | ||
412 | + */ | ||
413 | + public function getIdEstatus() | ||
414 | + { | ||
415 | + return $this->idEstatus; | ||
416 | + } | ||
417 | + | ||
418 | + | ||
419 | + | ||
420 | + | ||
421 | +} |
src/AppBundle/Form/AscensoType.php
@@ -0,0 +1,175 @@ | @@ -0,0 +1,175 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by Netbeans. | ||
4 | + * User: Wilmer Ramones | ||
5 | + * Date: 29/06/16 | ||
6 | + * Time: 09:07 AM | ||
7 | + * Modificado: 07/07/2016 | ||
8 | + */ | ||
9 | + | ||
10 | +namespace AppBundle\Form; | ||
11 | + | ||
12 | +use Symfony\Component\Validator\Constraints\File; | ||
13 | +use Symfony\Component\Validator\Constraints\NotBlank; | ||
14 | + | ||
15 | +use Symfony\Component\Form\AbstractType; | ||
16 | +use Symfony\Component\Form\FormBuilderInterface; | ||
17 | +use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
18 | +use Symfony\Component\Form\Extension\Core\Type\BirthdayType; | ||
19 | +use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | ||
20 | +use Symfony\Component\Form\Extension\Core\Type\FileType; | ||
21 | +use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
22 | + | ||
23 | +use Symfony\Bridge\Doctrine\Form\Type\EntityType; | ||
24 | +use Doctrine\ORM\EntityRepository; | ||
25 | + | ||
26 | +class AscensoType extends AbstractType | ||
27 | +{ | ||
28 | + public function buildForm(FormBuilderInterface $builder, array $options) | ||
29 | + { | ||
30 | + $builder | ||
31 | + | ||
32 | + ->add('trabajo', FileType::class, array( | ||
33 | + 'label' => 'Digital Constancia Trabajo Actualizada', | ||
34 | + 'constraints' => array( | ||
35 | + new NotBlank(), | ||
36 | + new File(array( | ||
37 | + 'maxSize' => '1024K', | ||
38 | + 'mimeTypes' => [ | ||
39 | + 'application/pdf', | ||
40 | + 'application/x-pdf', | ||
41 | + 'image/png', | ||
42 | + 'image/jpg', | ||
43 | + 'image/jpeg' | ||
44 | + ], | ||
45 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | ||
46 | + )) | ||
47 | + ) | ||
48 | + )) | ||
49 | + ->add('expediente', FileType::class, array( | ||
50 | + 'label' => 'Digital Actualización de Expediente', | ||
51 | + 'constraints' => array( | ||
52 | + new NotBlank(), | ||
53 | + new File(array( | ||
54 | + 'maxSize' => '1024K', | ||
55 | + 'mimeTypes' => [ | ||
56 | + 'application/pdf', | ||
57 | + 'application/x-pdf', | ||
58 | + 'image/png', | ||
59 | + 'image/jpg', | ||
60 | + 'image/jpeg' | ||
61 | + ], | ||
62 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | ||
63 | + )) | ||
64 | + ) | ||
65 | + )) | ||
66 | + | ||
67 | + ->add('pida', FileType::class, array( | ||
68 | + 'label' => 'Digital Socialización del PIDA', | ||
69 | + 'required' => true, | ||
70 | + 'constraints' => array( | ||
71 | + new File(array( | ||
72 | + 'maxSize' => '1024K', | ||
73 | + 'mimeTypes' => [ | ||
74 | + 'application/pdf', | ||
75 | + 'application/x-pdf', | ||
76 | + 'image/png', | ||
77 | + 'image/jpg', | ||
78 | + 'image/jpeg' | ||
79 | + ], | ||
80 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | ||
81 | + )) | ||
82 | + ) | ||
83 | + )) | ||
84 | + | ||
85 | + ->add('nai', FileType::class, array( | ||
86 | + 'label' => 'Digital Aval del NAI', | ||
87 | + 'required' => true, | ||
88 | + 'constraints' => array( | ||
89 | + new File(array( | ||
90 | + 'maxSize' => '1024K', | ||
91 | + 'mimeTypes' => [ | ||
92 | + 'application/pdf', | ||
93 | + 'application/x-pdf', | ||
94 | + 'image/png', | ||
95 | + 'image/jpg', | ||
96 | + 'image/jpeg' | ||
97 | + ], | ||
98 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | ||
99 | + )) | ||
100 | + ) | ||
101 | + )) | ||
102 | + | ||
103 | + ->add('titulo_trabajo', TextType::class, array( | ||
104 | + 'label' => 'Título del Trabajo de Investigación', | ||
105 | + | ||
106 | + 'required' => true, | ||
107 | + | ||
108 | + )) | ||
109 | + | ||
110 | + | ||
111 | + ->add('investigacion', FileType::class, array( | ||
112 | + 'label' => 'Digital Trabajo de investigación / Tesis', | ||
113 | + 'required' => true, | ||
114 | + 'constraints' => array( | ||
115 | + new File(array( | ||
116 | + 'maxSize' => '1024K', | ||
117 | + 'mimeTypes' => [ | ||
118 | + 'application/pdf', | ||
119 | + 'application/x-pdf', | ||
120 | + 'image/png', | ||
121 | + 'image/jpg', | ||
122 | + 'image/jpeg' | ||
123 | + ], | ||
124 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | ||
125 | + )) | ||
126 | + ) | ||
127 | + )) | ||
128 | + | ||
129 | + | ||
130 | + ->add('tipoTrabajoInvestigacion', CheckboxType::class, array( | ||
131 | + 'label' => 'Si su trabajo de investigación es TESIS, responda ¿Fue dentro de la UBV?', | ||
132 | + 'required' => false, | ||
133 | + )) | ||
134 | + | ||
135 | + ->add('pertinencia', FileType::class, array( | ||
136 | + 'label' => 'Informe de Pertinencia', | ||
137 | + 'label_attr' => array( 'class' => 'esc_oposicion'), | ||
138 | + 'required' => false, | ||
139 | + 'attr' => array( | ||
140 | + 'style' => 'display:none;', | ||
141 | + 'class' => 'esc_oposicion' | ||
142 | + ), | ||
143 | + 'constraints' => array( | ||
144 | + new File(array( | ||
145 | + 'maxSize' => '1024K', | ||
146 | + 'mimeTypes' => [ | ||
147 | + 'application/pdf', | ||
148 | + 'application/x-pdf', | ||
149 | + 'image/png', | ||
150 | + 'image/jpg', | ||
151 | + 'image/jpeg' | ||
152 | + ], | ||
153 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | ||
154 | + )) | ||
155 | + ) | ||
156 | + )) | ||
157 | + | ||
158 | + | ||
159 | + | ||
160 | + | ||
161 | + ->add('send', SubmitType::class, array( | ||
162 | + 'label' => 'Crear Solicitud de Ascenso', | ||
163 | + 'attr' => array('class' => 'btn btn-success btn-block') | ||
164 | + )) | ||
165 | + | ||
166 | + | ||
167 | + ; | ||
168 | + | ||
169 | + | ||
170 | + } | ||
171 | + | ||
172 | + | ||
173 | + | ||
174 | + | ||
175 | +} |