Commit c41fbb45eacbf7062776688f8f3dafca3fd62e5d

Authored by Wilmer Ramones
1 parent 931138bdeb
Exists in master

Trabajando en la adscripcion con symfony casi terminada

app/Resources/views/registration/register.html.twig
... ... @@ -11,7 +11,7 @@
11 11 {% block stylesheets %}
12 12 {{ parent() }}
13 13 <style>
14   - .esc_oposicion{
  14 + .esc_oposicion, .esc_asistente, .esc_agregado{
15 15 display: none;
16 16 }
17 17 </style>
... ... @@ -26,7 +26,19 @@
26 26 });
27 27  
28 28 $('#user_ascenso').click(function() {
29   - $('.esc_ascenso')[this.checked ? "show" : "hide"]();
  29 + //alert($("#user_escalafones").val());
  30 + if($("#user_escalafones").val() == 1)
  31 + $('.esc_asistente')[this.checked ? "show" : "hide"]();
  32 + if($("#user_escalafones").val() == 2)
  33 + $('.esc_agregado')[this.checked ? "show" : "hide"]();
30 34 });
  35 +
  36 +
  37 + $('#user_ascenso2').click(function() {
  38 +
  39 + if($("#user_escalafones").val() == 1)
  40 + $('.esc_agregado')[this.checked ? "show" : "hide"]();
  41 + });
  42 +
31 43 </script>
32   -{% endblock %}
33 44 \ No newline at end of file
  45 +{% endblock %}
... ...
app/Resources/views/registration/register.html.twig~
... ... @@ -0,0 +1,44 @@
  1 +{% extends 'base.html.twig' %}
  2 +
  3 +{% block body %}
  4 + {% form_theme form 'bootstrap_3_horizontal_layout.html.twig' %}
  5 + {{ form_start(form) }}
  6 + {{ form_widget(form) }}
  7 +
  8 +
  9 +{% endblock %}
  10 +
  11 +{% block stylesheets %}
  12 + {{ parent() }}
  13 + <style>
  14 + .esc_oposicion, .esc_asistente, .esc_agregado{
  15 + display: none;
  16 + }
  17 + </style>
  18 +{% endblock %}
  19 +
  20 +
  21 +{% block javascripts %}
  22 + {{ parent() }}
  23 + <script type="text/javascript">
  24 + $('#user_oposicion').click(function() {
  25 + $('.esc_oposicion')[this.checked ? "show" : "hide"]();
  26 + });
  27 +
  28 + $('#user_ascenso').click(function() {
  29 + //alert($("#user_escalafones").val());
  30 + if($("#user_escalafones").val() == 1)
  31 + $('.esc_asistente')[this.checked ? "show" : "hide"]();
  32 + if($("#user_escalafones").val() == 2)
  33 + $('.esc_agregado')[this.checked ? "show" : "hide"]();
  34 + });
  35 +
  36 +
  37 + $('#user_ascenso2').click(function() {
  38 + alert($('.esc_asistente').val());
  39 + if($("#user_escalafones").val() == 2)
  40 + $('.esc_agregado')[this.checked ? "show" : "hide"]();
  41 + });
  42 +
  43 + </script>
  44 +{% endblock %}
... ...
app/config/parameters.yml~
... ... @@ -0,0 +1,13 @@
  1 +# This file is auto-generated during the composer install
  2 +parameters:
  3 + adscripcion_directory: '%kernel.root_dir%/../web/uploads/solicitudes'
  4 + database_host: 127.0.0.1
  5 + database_port: null
  6 + database_name: cea_db_sym
  7 + database_user: wilmer
  8 + database_password: 17135525
  9 + mailer_transport: gmail
  10 + mailer_host: smtp.gmail.com
  11 + mailer_user: wilmer.ramones@gmail.com
  12 + mailer_password: 07102009RR
  13 + secret: as47d657ew8r74654j8974k51sd4fg65a4s984
... ...
app/config/security.yml
... ... @@ -35,5 +35,6 @@ security:
35 35 # http://symfony.com/doc/current/cookbook/security/form_login_setup.html
36 36 access_control:
37 37 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  38 + - { path: ^/register, roles: ROLE_DOCENTE }
38 39 - { path: ^/admin, roles: ROLE_ADMINISTRADOR }
39   - - { path: ^/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
40 40 \ No newline at end of file
  41 + - { path: ^/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
... ...
app/config/security.yml~
... ... @@ -0,0 +1,39 @@
  1 +# To get started with security, check out the documentation:
  2 +# http://symfony.com/doc/current/book/security.html
  3 +security:
  4 + encoders:
  5 + AppBundle\Entity\Usuarios:
  6 + algorithm: bcrypt
  7 +
  8 + # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers
  9 + providers:
  10 + our_db_provider:
  11 + entity:
  12 + class: AppBundle:Usuarios
  13 + property: username
  14 +
  15 + firewalls:
  16 + main:
  17 + anonymous: ~
  18 + http_basic: ~
  19 + provider: our_db_provider
  20 + form_login:
  21 + login_path: /login
  22 + check_path: /login
  23 + csrf_token_generator: security.csrf.token_manager
  24 + logout:
  25 + path: /logout
  26 + target: /
  27 +
  28 +
  29 + # activate different ways to authenticate
  30 +
  31 + # http_basic: ~
  32 + # http://symfony.com/doc/current/book/security.html#a-configuring-how-your-users-will-authenticate
  33 +
  34 + # form_login: ~
  35 + # http://symfony.com/doc/current/cookbook/security/form_login_setup.html
  36 + access_control:
  37 + - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
  38 + - { path: ^/admin, roles: ROLE_ADMINISTRADOR }
  39 + - { path: ^/, roles: IS_AUTHENTICATED_ANONYMOUSLY }
... ...
app/sessions/sess_3d9kmj192tt5lorj0urd93edj4
... ... @@ -1 +0,0 @@
1   -_sf2_attributes|a:4:{s:15:"_csrf/solicitar";s:43:"MP2A8aTFnMygUhUGTe5l1wmfZ3jaYTwCrmRhKBJZBWo";s:18:"_csrf/authenticate";s:43:"T1PXJXEK9uLQJgSe1MNFRtWiARHKnAX2lXlGrzIRHmk";s:14:"_security_main";s:387:"C:74:"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken":299:{a:3:{i:0;N;i:1;s:4:"main";i:2;s:259:"a:4:{i:0;C:25:"AppBundle\Entity\Usuarios":106:{a:3:{i:0;i:11;i:1;s:8:"wramones";i:2;s:60:"$2y$13$UN60aw0H6QLaO5k.ghyvIOrQjW1UPt210b6ReDJUgQGZ7VK9SwoeK";}}i:1;b:1;i:2;a:1:{i:0;C:21:"AppBundle\Entity\Role":38:{a:2:{i:0;i:3;i:1;s:12:"ROLE_DOCENTE";}}}i:3;a:0:{}}";}}";s:10:"_csrf/user";s:43:"GU0sZN1sPT352oXxrvAd9f_EWBvNjGTgnfdsCYis1Aw";}_sf2_flashes|a:0:{}_sf2_meta|a:3:{s:1:"u";i:1467397203;s:1:"c";i:1467393544;s:1:"l";s:1:"0";}
2 0 \ No newline at end of file
app/sessions/sess_3sotc5qph321r5hcomt4aehth3
... ... @@ -1 +0,0 @@
1   -_sf2_attributes|a:4:{s:15:"_csrf/solicitar";s:43:"XZ1SchlUnun6-CVChkyqxC-lGZP1gElUH9bvN6zmGoY";s:18:"_csrf/authenticate";s:43:"0SYNksltRL1m0aa23y1X6Vya4sspIT8knwKjFZ2TnMA";s:14:"_security_main";s:387:"C:74:"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken":299:{a:3:{i:0;N;i:1;s:4:"main";i:2;s:259:"a:4:{i:0;C:25:"AppBundle\Entity\Usuarios":106:{a:3:{i:0;i:11;i:1;s:8:"wramones";i:2;s:60:"$2y$13$UN60aw0H6QLaO5k.ghyvIOrQjW1UPt210b6ReDJUgQGZ7VK9SwoeK";}}i:1;b:1;i:2;a:1:{i:0;C:21:"AppBundle\Entity\Role":38:{a:2:{i:0;i:3;i:1;s:12:"ROLE_DOCENTE";}}}i:3;a:0:{}}";}}";s:10:"_csrf/user";s:43:"k4cJ2inc0yIn3qdkSv9caczRonO1lYkX19RyY1gcAUY";}_sf2_flashes|a:0:{}_sf2_meta|a:3:{s:1:"u";i:1467646430;s:1:"c";i:1467637261;s:1:"l";s:1:"0";}
2 0 \ No newline at end of file
app/sessions/sess_b7cg3j7u2h7vmm5hs6fpq885p6
... ... @@ -0,0 +1 @@
  1 +_sf2_attributes|a:4:{s:26:"_security.main.target_path";s:30:"http://localhost:8000/register";s:18:"_csrf/authenticate";s:43:"UQ6zMyyvroC7RDUqoinJjUIuMqhAIEW0UnGThan_ACc";s:14:"_security_main";s:386:"C:74:"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken":298:{a:3:{i:0;N;i:1;s:4:"main";i:2;s:258:"a:4:{i:0;C:25:"AppBundle\Entity\Usuarios":105:{a:3:{i:0;i:1;i:1;s:8:"wramones";i:2;s:60:"$2y$13$BdGlK17e5E0JKPeYjc6khOC0YcR.5M5G9VpzAe1/zx8nOZExCwpqu";}}i:1;b:1;i:2;a:1:{i:0;C:21:"AppBundle\Entity\Role":38:{a:2:{i:0;i:1;i:1;s:12:"ROLE_DOCENTE";}}}i:3;a:0:{}}";}}";s:10:"_csrf/user";s:43:"Bhz7lOqWcj-kkbA4sEIFGGCd88lwqn2cyW7Nz2gjqmM";}_sf2_flashes|a:0:{}_sf2_meta|a:3:{s:1:"u";i:1467757191;s:1:"c";i:1467713451;s:1:"l";s:1:"0";}
0 2 \ No newline at end of file
... ...
src/AppBundle/Controller/DefaultController.php
... ... @@ -47,7 +47,7 @@ class DefaultController extends Controller
47 47 ->encodePassword($login, $login->getPlainPassword()); //encripta la contraseña
48 48 $login->setPassword($password);
49 49 $login->setIdRolInstitucion($rol);
50   - $permiso = $this->getDoctrine()->getRepository('AppBundle:Role')->findOneById(3);
  50 + $permiso = $this->getDoctrine()->getRepository('AppBundle:Role')->findOneById(1);
51 51 $login->addRol($permiso); //le añade la permisología básica de docente
52 52 $em = $this->getDoctrine()->getManager();
53 53 $em->persist($login);
... ...
src/AppBundle/Controller/DefaultController.php~
... ... @@ -0,0 +1,137 @@
  1 +<?php
  2 +
  3 +namespace AppBundle\Controller;
  4 +
  5 +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  6 +use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  7 +use Symfony\Component\HttpFoundation\Request;
  8 +
  9 +use AppBundle\Entity\Usuarios;
  10 +
  11 +class DefaultController extends Controller
  12 +{
  13 + /**
  14 + * @Route("/", name="homepage")
  15 + */
  16 + public function indexAction(Request $request)
  17 + {
  18 + $form = $this->createForm('AppBundle\Form\SolicitarType');
  19 + $form->handleRequest($request);
  20 +
  21 + if ($form->isSubmitted() && $form->isValid()) {
  22 +
  23 + //1. obtener el rol-institucion-persona
  24 + $rol = $this->getDoctrine()->getRepository(
  25 + 'AppBundle:RolInstitucion')->findOneByIdRol(
  26 + $this->getDoctrine()->getRepository(
  27 + 'AppBundle:Rol')->findOneByIdPersona(
  28 + $this->getDoctrine()->getRepository('AppBundle:Persona')
  29 + ->findOneByCedulaPasaporte($form->get('cedula')->getData())->getId()));
  30 +
  31 + //si no existe el rol del docente, enviar correo al encargado de la región para verificar.
  32 + if (!$rol) {
  33 + throw $this->createNotFoundException(
  34 + 'No product found for id '. $form->get('cedula')->getData()
  35 + );
  36 + }
  37 +
  38 + //si el docente existe, crea el nombre de usuario.
  39 + $usuario = mb_strtolower($rol->getIdRol()->getIdPersona()->getPrimerNombre()[0] .$rol->getIdRol()->getIdPersona()->getPrimerApellido());
  40 + //busca en la base de datos para ver si ese nombre de usuario ya existe
  41 + $credenciales = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByUsername($usuario);
  42 + if(!$credenciales){ //si no existe, procede a crear usuario y contraseña.
  43 + $login = new Usuarios();
  44 + $login->setUsername($usuario);
  45 + $login->setPlainPassword($form->get('cedula')->getData());
  46 + $password = $this->get('security.password_encoder')
  47 + ->encodePassword($login, $login->getPlainPassword()); //encripta la contraseña
  48 + $login->setPassword($password);
  49 + $login->setIdRolInstitucion($rol);
  50 + $permiso = $this->getDoctrine()->getRepository('AppBundle:Role')->findOneById(3);
  51 + $login->addRol($permiso); //le añade la permisología básica de docente
  52 + $em = $this->getDoctrine()->getManager();
  53 + $em->persist($login);
  54 + $em->flush(); //guarda en la base de datos
  55 +
  56 +
  57 + $message = \Swift_Message::newInstance()
  58 + ->setSubject('Bienvenido al sistema CEA@UBV')
  59 + ->setFrom('wilmer.ramones@gmail.com')
  60 + ->setTo($form->get('correo')->getData())
  61 + ->setBody(
  62 + $this->renderView(
  63 + 'correos/solicitud_adscripcion.html.twig',
  64 + array(
  65 + 'nombres' => $form->get('nombres')->getData(),
  66 + 'apellidos' => $form->get('apellidos')->getData(),
  67 + 'usuario' => $login->getUsername(),
  68 + 'contra' => $login->getPlainPassword(),
  69 +
  70 + )
  71 + ),
  72 + 'text/html'
  73 + )
  74 + /*
  75 + * If you also want to include a plaintext version of the message
  76 + ->addPart(
  77 + $this->renderView(
  78 + 'Emails/registration.txt.twig',
  79 + array('name' => $name)
  80 + ),
  81 + 'text/plain'
  82 + )
  83 + */
  84 + ;
  85 + $this->get('mailer')->send($message);
  86 +
  87 +
  88 +
  89 + }else{
  90 + throw $this->createNotFoundException(
  91 + 'Ya tiene usuario y contraseña '. $form->get('cedula')->getData()
  92 + );
  93 + }
  94 + throw $this->createNotFoundException(
  95 + 'Docente Encontrado '. $form->get('cedula')->getData()
  96 + );
  97 +
  98 +
  99 +
  100 + $message = \Swift_Message::newInstance()
  101 + ->setSubject('Hello Email')
  102 + ->setFrom('send@example.com')
  103 + ->setTo('wilmer.ramones@gmail.com')
  104 + ->setBody(
  105 + $this->renderView(
  106 + 'correos/solicitud_adscripcion.html.twig',
  107 + array(
  108 + 'nombres' => $form->get('nombres')->getData(),
  109 + 'apellidos' => $form->get('apellidos')->getData(),
  110 +
  111 + )
  112 + ),
  113 + 'text/html'
  114 + )
  115 + /*
  116 + * If you also want to include a plaintext version of the message
  117 + ->addPart(
  118 + $this->renderView(
  119 + 'Emails/registration.txt.twig',
  120 + array('name' => $name)
  121 + ),
  122 + 'text/plain'
  123 + )
  124 + */
  125 + ;
  126 + //$this->get('mailer')->send($message);
  127 +
  128 + //$request->getSession()->getFlashBag()->add('success', 'Your email has been sent! Thanks!');
  129 + }
  130 +
  131 + // replace this example code with whatever you need
  132 + return $this->render('default/index.html.twig', array(
  133 + 'base_dir' => realpath($this->container->getParameter('kernel.root_dir').'/..'),
  134 + 'form' => $form->createView(),
  135 + ));
  136 + }
  137 +}
... ...
src/AppBundle/Controller/RegistrationController.php
... ... @@ -13,6 +13,8 @@ use AppBundle\Entity\Usuarios;
13 13 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
14 14 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
15 15 use Symfony\Component\HttpFoundation\Request;
  16 +use AppBundle\Entity\Adscripcion;
  17 +use AppBundle\Entity\DocenteEscala;
16 18  
17 19 class RegistrationController extends Controller
18 20 {
... ... @@ -21,15 +23,66 @@ class RegistrationController extends Controller
21 23 */
22 24 public function registerAction(Request $request)
23 25 {
24   - // 1) build the form
25   -
  26 +
  27 + $adscripcion = new Adscripcion();
  28 + $escala = new DocenteEscala();
26 29 $form = $this->createForm('AppBundle\Form\UserType');
27   -
28   - // 2) handle the submit (will only happen on POST)
29   - $form->handleRequest($request);
30   - //var_dump($form->isValid());
  30 + $form->handleRequest($request);
  31 +
31 32 if ($form->isSubmitted() && $form->isValid()) {
  33 + //var_dump($user = $this->getUser()->getIdRolInstitucion()->getId()); exit;
  34 + // $file stores the uploaded PDF file
  35 + /** @var Symfony\Component\HttpFoundation\File\UploadedFile $file */
  36 + $constanciaTrabajo = $form->get('trabajo')->getData();
  37 + $constanciaPregrado = $form->get('pregrado')->getData();
  38 +
  39 +
  40 +
  41 + // Generate a unique name for the file before saving it
  42 + $nombreTrabajo = md5(uniqid()).'.'.$constanciaTrabajo->guessExtension();
  43 + $nombrePregrado = md5(uniqid()).'.'.$constanciaPregrado->guessExtension();
  44 +
  45 + // Move the file to the directory where brochures are stored
  46 + $constanciaTrabajo->move(
  47 + $this->container->getParameter('adscripcion_directory'),
  48 + $nombreTrabajo
  49 + );
  50 +
  51 + $constanciaPregrado->move(
  52 + $this->container->getParameter('adscripcion_directory'),
  53 + $nombrePregrado
  54 + );
  55 +
  56 + if($form->get('postgrado')->getData()) {
  57 + $constanciaPostgrado = $form->get('postgrado')->getData();
  58 + $nombrePostgrado = md5(uniqid()).'.'.$constanciaPregrado->guessExtension();
  59 + $constanciaPostgrado->move(
  60 + $this->container->getParameter('adscripcion_directory'),
  61 + $nombrePostgrado
  62 + );
  63 + }
  64 +
  65 + // Update the 'brochure' property to store the PDF file name
  66 + // instead of its contents
  67 + $adscripcion->setTrabajo($nombreTrabajo);
  68 + $adscripcion->setPregrado($nombrePregrado);
  69 + $adscripcion->setIdRolInstitucion($this->getUser()->getIdRolInstitucion());
  70 + $escala->setIdRolInstitucion($this->getUser()->getIdRolInstitucion());
  71 + $escala->setFechaEscala($form->get('fecha_oposicion')->getData());
  72 + $escala->setIdEscala($form->get('escala')->getData());
  73 +
  74 +
  75 +
  76 + $em = $this->getDoctrine()->getManager();
  77 + $em->persist($adscripcion);
  78 + $em->persist($escala);
  79 +
  80 + $em->flush(); //guarda en la base de datos
  81 +
  82 +
  83 +
32 84  
  85 + //return $this->redirect($this->generateUrl('app_product_list'));
33 86 }
34 87  
35 88 return $this->render(
... ... @@ -37,4 +90,4 @@ class RegistrationController extends Controller
37 90 array('form' => $form->createView())
38 91 );
39 92 }
40   -}
41 93 \ No newline at end of file
  94 +}
... ...
src/AppBundle/Controller/RegistrationController.php~
... ... @@ -0,0 +1,92 @@
  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 +use AppBundle\Form\UserType;
  12 +use AppBundle\Entity\Usuarios;
  13 +use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  14 +use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  15 +use Symfony\Component\HttpFoundation\Request;
  16 +use AppBundle\Entity\Adscripcion;
  17 +use AppBundle\Entity\DocenteEscala;
  18 +
  19 +class RegistrationController extends Controller
  20 +{
  21 + /**
  22 + * @Route("/register", name="user_registration")
  23 + */
  24 + public function registerAction(Request $request)
  25 + {
  26 +
  27 + $adscripcion = new Adscripcion();
  28 + $escala = new DocenteEscala();
  29 + $form = $this->createForm('AppBundle\Form\UserType');
  30 + $form->handleRequest($request);
  31 +
  32 + if ($form->isSubmitted() && $form->isValid()) {
  33 + //var_dump($user = $this->getUser()->getIdRolInstitucion()->getId()); exit;
  34 + // $file stores the uploaded PDF file
  35 + /** @var Symfony\Component\HttpFoundation\File\UploadedFile $file */
  36 + $constanciaTrabajo = $form->get('trabajo')->getData();
  37 + $constanciaPregrado = $form->get('pregrado')->getData();
  38 +
  39 +
  40 +
  41 + // Generate a unique name for the file before saving it
  42 + $nombreTrabajo = md5(uniqid()).'.'.$constanciaTrabajo->guessExtension();
  43 + $nombrePregrado = md5(uniqid()).'.'.$constanciaPregrado->guessExtension();
  44 +
  45 + // Move the file to the directory where brochures are stored
  46 + $constanciaTrabajo->move(
  47 + $this->container->getParameter('adscripcion_directory'),
  48 + $nombreTrabajo
  49 + );
  50 +
  51 + $constanciaPregrado->move(
  52 + $this->container->getParameter('adscripcion_directory'),
  53 + $nombrePregrado
  54 + );
  55 +
  56 + if($form->get('postgrado')->getData()) {
  57 + $constanciaPostgrado = $form->get('postgrado')->getData();
  58 + $nombrePostgrado = md5(uniqid()).'.'.$constanciaPregrado->guessExtension();
  59 + $constanciaPostgrado->move(
  60 + $this->container->getParameter('adscripcion_directory'),
  61 + $nombrePostgrado
  62 + );
  63 + }
  64 +
  65 + // Update the 'brochure' property to store the PDF file name
  66 + // instead of its contents
  67 + $adscripcion->setTrabajo($nombreTrabajo);
  68 + $adscripcion->setPregrado($nombrePregrado);
  69 + $adscripcion->setIdRolInstitucion($this->getUser()->getIdRolInstitucion());
  70 + $escala->setIdRolInstitucion($this->getUser()->getIdRolInstitucion());
  71 + $escala->setFechaEscala($form->get('fecha_oposicion')->getData());
  72 +
  73 +
  74 +
  75 + $em = $this->getDoctrine()->getManager();
  76 + $em->persist($adscripcion);
  77 + $em->persist($escala);
  78 +
  79 + $em->flush(); //guarda en la base de datos
  80 +
  81 +
  82 +
  83 +
  84 + //return $this->redirect($this->generateUrl('app_product_list'));
  85 + }
  86 +
  87 + return $this->render(
  88 + 'registration/register.html.twig',
  89 + array('form' => $form->createView())
  90 + );
  91 + }
  92 +}
... ...
src/AppBundle/Entity/Adscripcion.php
... ... @@ -0,0 +1,198 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: Wilmer Ramones
  5 + * Date: 29/06/16
  6 + * Time: 07:52 AM
  7 + */
  8 +
  9 +namespace AppBundle\Entity;
  10 +
  11 +use Doctrine\ORM\Mapping as ORM;
  12 +use Symfony\Component\Validator\Constraints as Assert;
  13 +use Doctrine\Common\Collections\ArrayCollection;
  14 +
  15 +/**
  16 + * Adscripcion
  17 + *
  18 + * @ORM\Table(name="solicitud_adscripcion", uniqueConstraints={@ORM\UniqueConstraint(name="adscripcion_id_rol_institucion_key", columns={"id_rol_institucion"})})
  19 + * @ORM\Entity
  20 + * @ORM\HasLifecycleCallbacks()
  21 + */
  22 +class Adscripcion
  23 +{
  24 +
  25 + /**
  26 + * @var integer
  27 + *
  28 + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador de la Adscripcion"})
  29 + * @ORM\Id
  30 + * @ORM\GeneratedValue(strategy="IDENTITY")
  31 + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1)
  32 + */
  33 + private $id;
  34 +
  35 +
  36 +
  37 + /**
  38 + * @var \AppBundle\Entity\RolInstitucion
  39 + *
  40 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion")
  41 + * @ORM\JoinColumns({
  42 + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false)
  43 + * })
  44 + */
  45 + protected $idRolInstitucion;
  46 +
  47 +
  48 + /**
  49 + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la constancia de trabajo"})
  50 + *
  51 + * @Assert\NotBlank(message="Debe cargar su constancia de Trabajo, es obligatoria.")
  52 + * @Assert\File(mimeTypes={ "application/pdf" })
  53 + */
  54 + private $trabajo;
  55 +
  56 +
  57 + /**
  58 + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion del titulo de pregrado"})
  59 + *
  60 + * @Assert\NotBlank(message="debe cargar su título de pregrado en digital, es obligatorio.")
  61 + * @Assert\File(mimeTypes={ "application/pdf" })
  62 + */
  63 + private $pregrado;
  64 +
  65 +
  66 + /**
  67 + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicacion del titulo de postgrado en caso de tenerlo"})
  68 + *
  69 + *
  70 + * @Assert\File(mimeTypes={ "application/pdf" })
  71 + */
  72 + private $postgrado;
  73 +
  74 +
  75 +
  76 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de creación de la solicitud"})
  77 +
  78 + */
  79 +
  80 + private $fecha_creacion;
  81 +
  82 +
  83 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de actualizacion de la solicitud"})
  84 +
  85 + */
  86 +
  87 + private $fecha_ultima_actualizacion;
  88 +
  89 +
  90 +
  91 +
  92 +
  93 + public function getTrabajo()
  94 + {
  95 + return $this->trabajo;
  96 + }
  97 +
  98 + public function setTrabajo($trabajo)
  99 + {
  100 + $this->trabajo = $trabajo;
  101 +
  102 + return $this;
  103 + }
  104 +
  105 + public function getPregrado()
  106 + {
  107 + return $this->pregrado;
  108 + }
  109 +
  110 + public function setPregrado($pregrado)
  111 + {
  112 + $this->pregrado = $pregrado;
  113 +
  114 + return $this;
  115 + }
  116 +
  117 + public function getPostgrado()
  118 + {
  119 + return $this->postgrado;
  120 + }
  121 +
  122 + public function setPostgrado($postgrado)
  123 + {
  124 + $this->postgrado = $postgrado;
  125 +
  126 + return $this;
  127 + }
  128 +
  129 +
  130 +
  131 + /**
  132 + * Get id
  133 + *
  134 + * @return integer
  135 + */
  136 + public function getId()
  137 + {
  138 + return $this->id;
  139 + }
  140 +
  141 + /**
  142 + * Get nombre
  143 + *
  144 + * @return string
  145 + */
  146 + public function __toString()
  147 + {
  148 + return $this->trabajo;
  149 + }
  150 +
  151 + /**
  152 + * Set idRolInstitucion
  153 + *
  154 + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion
  155 + * @return Usuarios
  156 + */
  157 + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion = null)
  158 + {
  159 + $this->idRolInstitucion = $idRolInstitucion;
  160 +
  161 + return $this;
  162 + }
  163 +
  164 + /**
  165 + * Get idRolInstitucion
  166 + *
  167 + * @return \AppBundle\Entity\RolInstitucion
  168 + */
  169 + public function getIdRolInstitucion()
  170 + {
  171 + return $this->idRolInstitucion;
  172 + }
  173 +
  174 + /**
  175 + * @ORM\PrePersist
  176 + */
  177 + public function setFechaCreacion()
  178 + {
  179 + $this->fecha_creacion = new \DateTime();
  180 + $this->fecha_ultima_actualizacion = new \DateTime();
  181 + }
  182 +
  183 + /**
  184 + * @ORM\PreUpdate
  185 + */
  186 + public function setFechaUltimaActualizacion()
  187 + {
  188 + $this->fecha_utlima_actualizacion = new \DateTime();
  189 + }
  190 +
  191 +
  192 +
  193 +
  194 +
  195 +
  196 +
  197 +
  198 +}
... ...
src/AppBundle/Entity/Adscripcion.php~
... ... @@ -0,0 +1,249 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: Wilmer Ramones
  5 + * Date: 29/06/16
  6 + * Time: 07:52 AM
  7 + */
  8 +
  9 +namespace AppBundle\Entity;
  10 +
  11 +use Doctrine\ORM\Mapping as ORM;
  12 +use Symfony\Component\Validator\Constraints as Assert;
  13 +use Doctrine\Common\Collections\ArrayCollection;
  14 +
  15 +/**
  16 + * Adscripcion
  17 + *
  18 + * @ORM\Table(name="solicitud_adscripcion", uniqueConstraints={@ORM\UniqueConstraint(name="adscripcion_id_rol_institucion_key", columns={"id_rol_institucion"})})
  19 + * @ORM\Entity
  20 + * @ORM\HasLifecycleCallbacks()
  21 + */
  22 +class Adscripcion
  23 +{
  24 +
  25 + /**
  26 + * @var integer
  27 + *
  28 + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador de la Adscripcion"})
  29 + * @ORM\Id
  30 + * @ORM\GeneratedValue(strategy="IDENTITY")
  31 + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1)
  32 + */
  33 + private $id;
  34 +
  35 +
  36 +
  37 + /**
  38 + * @var \AppBundle\Entity\RolInstitucion
  39 + *
  40 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion")
  41 + * @ORM\JoinColumns({
  42 + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false)
  43 + * })
  44 + */
  45 + protected $idRolInstitucion;
  46 +
  47 +
  48 + /**
  49 + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion de la constancia de trabajo"})
  50 + *
  51 + * @Assert\NotBlank(message="Debe cargar su constancia de Trabajo, es obligatoria.")
  52 + * @Assert\File(mimeTypes={ "application/pdf" })
  53 + */
  54 + private $trabajo;
  55 +
  56 +
  57 + /**
  58 + * @ORM\Column(type="string", nullable=false, options={"comment" = "ubicacion del titulo de pregrado"})
  59 + *
  60 + * @Assert\NotBlank(message="debe cargar su título de pregrado en digital, es obligatorio.")
  61 + * @Assert\File(mimeTypes={ "application/pdf" })
  62 + */
  63 + private $pregrado;
  64 +
  65 +
  66 + /**
  67 + * @ORM\Column(type="string", nullable=true, options={"comment" = "ubicacion del titulo de postgrado en caso de tenerlo"})
  68 + *
  69 + *
  70 + * @Assert\File(mimeTypes={ "application/pdf" })
  71 + */
  72 + private $postgrado;
  73 +
  74 +
  75 +
  76 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de creación de la solicitud"})
  77 +
  78 + */
  79 +
  80 + private $fecha_creacion;
  81 +
  82 +
  83 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de actualizacion de la solicitud"})
  84 +
  85 + */
  86 +
  87 + private $fecha_ultima_actualizacion;
  88 +
  89 +
  90 +
  91 + /**
  92 + * @ORM\OneToMany(targetEntity="AppBundle\Entity\DocenteEscala", mappedBy="docente")
  93 + */
  94 + private $escala;
  95 + // ...
  96 +
  97 + public function __construct() {
  98 + $this->escala = new ArrayCollection();
  99 + }
  100 +
  101 +
  102 +
  103 +
  104 +
  105 +
  106 + public function getTrabajo()
  107 + {
  108 + return $this->trabajo;
  109 + }
  110 +
  111 + public function setTrabajo($trabajo)
  112 + {
  113 + $this->trabajo = $trabajo;
  114 +
  115 + return $this;
  116 + }
  117 +
  118 + public function getPregrado()
  119 + {
  120 + return $this->pregrado;
  121 + }
  122 +
  123 + public function setPregrado($pregrado)
  124 + {
  125 + $this->pregrado = $pregrado;
  126 +
  127 + return $this;
  128 + }
  129 +
  130 + public function getPostgrado()
  131 + {
  132 + return $this->postgrado;
  133 + }
  134 +
  135 + public function setPostgrado($postgrado)
  136 + {
  137 + $this->postgrado = $postgrado;
  138 +
  139 + return $this;
  140 + }
  141 +
  142 +
  143 +
  144 + /**
  145 + * Get id
  146 + *
  147 + * @return integer
  148 + */
  149 + public function getId()
  150 + {
  151 + return $this->id;
  152 + }
  153 +
  154 + /**
  155 + * Get nombre
  156 + *
  157 + * @return string
  158 + */
  159 + public function __toString()
  160 + {
  161 + return $this->trabajo;
  162 + }
  163 +
  164 + /**
  165 + * Set idRolInstitucion
  166 + *
  167 + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion
  168 + * @return Usuarios
  169 + */
  170 + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion = null)
  171 + {
  172 + $this->idRolInstitucion = $idRolInstitucion;
  173 +
  174 + return $this;
  175 + }
  176 +
  177 + /**
  178 + * Get idRolInstitucion
  179 + *
  180 + * @return \AppBundle\Entity\RolInstitucion
  181 + */
  182 + public function getIdRolInstitucion()
  183 + {
  184 + return $this->idRolInstitucion;
  185 + }
  186 +
  187 + /**
  188 + * @ORM\PrePersist
  189 + */
  190 + public function setFechaCreacion()
  191 + {
  192 + $this->fecha_creacion = new \DateTime();
  193 + $this->fecha_ultima_actualizacion = new \DateTime();
  194 + }
  195 +
  196 + /**
  197 + * @ORM\PreUpdate
  198 + */
  199 + public function setFechaUltimaActualizacion()
  200 + {
  201 + $this->fecha_utlima_actualizacion = new \DateTime();
  202 + }
  203 +
  204 +
  205 +
  206 + /**
  207 + * Add escala
  208 + *
  209 + * @param \AppBundle\Entity\DocenteEscala $escala
  210 + * @return DocenteEscala
  211 + */
  212 + public function addEscala(\AppBundle\Entity\DocenteEscala $escala)
  213 + {
  214 + $this->escala[] = $escala;
  215 +
  216 + return $this;
  217 + }
  218 +
  219 + /**
  220 + * Remove escala
  221 + *
  222 + * @param \AppBundle\Entity\DocenteEscala $escala
  223 + */
  224 + public function removeEscala(\AppBundle\Entity\DocenteEscala $escala)
  225 + {
  226 + $this->escala->removeElement($escala);
  227 + }
  228 +
  229 + /**
  230 + * Get Escala
  231 + *
  232 + * @return \Doctrine\Common\Collections\Collection
  233 + */
  234 + public function getEscala()
  235 + {
  236 + return $this->escala;
  237 + }
  238 +
  239 +
  240 + public function getEscalafones()
  241 + {
  242 + return $this->escala->toArray(); /*IMPORTANTE: el mecanismo de seguridad de Sf2 requiere ésto como un array*/
  243 + }
  244 +
  245 +
  246 +
  247 +
  248 +
  249 +}
... ...
src/AppBundle/Entity/CrearAdscripcion.php~
... ... @@ -0,0 +1,89 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: Wilmer Ramones
  5 + * Date: 29/06/16
  6 + * Time: 07:52 AM
  7 + */
  8 +
  9 +namespace AppBundle\Entity;
  10 +
  11 +use Doctrine\ORM\Mapping as ORM;
  12 +use Symfony\Component\Validator\Constraints as Assert;
  13 +
  14 +/**
  15 + * Adscripcion
  16 + *
  17 + * @ORM\Table(name="solicitud_adscripcion", uniqueConstraints={@ORM\UniqueConstraint(name="uq_nombre_adscripcion", columns={"nombre"})})
  18 + * @ORM\Entity
  19 + */
  20 +class Adscripcion
  21 +{
  22 +
  23 + /**
  24 + * @var integer
  25 + *
  26 + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador de la Adscripcion"})
  27 + * @ORM\Id
  28 + * @ORM\GeneratedValue(strategy="IDENTITY")
  29 + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1)
  30 + */
  31 + private $id;
  32 +
  33 +
  34 +
  35 + /**
  36 + * @var \AppBundle\Entity\RolInstitucion
  37 + *
  38 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion")
  39 + * @ORM\JoinColumns({
  40 + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false)
  41 + * })
  42 + */
  43 + protected $idRolInstitucion;
  44 +
  45 +
  46 + /**
  47 + * @ORM\Column(type="string")
  48 + *
  49 + * @Assert\NotBlank(message="Please, upload the product brochure as a PDF file.")
  50 + * @Assert\File(mimeTypes={ "application/pdf" })
  51 + */
  52 + private $trabajo;
  53 +
  54 + public function getTrabajo()
  55 + {
  56 + return $this->trabajo;
  57 + }
  58 +
  59 + public function setBrochure($trabajo)
  60 + {
  61 + $this->trabajo = $trabajo;
  62 +
  63 + return $this;
  64 + }
  65 +
  66 +
  67 +
  68 + /**
  69 + * Get id
  70 + *
  71 + * @return integer
  72 + */
  73 + public function getId()
  74 + {
  75 + return $this->id;
  76 + }
  77 +
  78 + /**
  79 + * Get nombre
  80 + *
  81 + * @return string
  82 + */
  83 + public function __toString()
  84 + {
  85 + return $this->trabajo;
  86 + }
  87 +
  88 +
  89 +}
... ...
src/AppBundle/Entity/DocenteEscala.php
... ... @@ -0,0 +1,163 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: Wilmer Ramones
  5 + * Date: 29/06/16
  6 + * Time: 07:52 AM
  7 + */
  8 +
  9 +namespace AppBundle\Entity;
  10 +
  11 +use Doctrine\ORM\Mapping as ORM;
  12 +use Symfony\Component\Validator\Constraints as Assert;
  13 +
  14 +/**
  15 + * Escalafones
  16 + *
  17 + * @ORM\Table(name="docente_escala")
  18 + * @ORM\Entity
  19 + * @ORM\HasLifecycleCallbacks()
  20 + */
  21 +class DocenteEscala
  22 +{
  23 +
  24 +
  25 + /**
  26 + * @var integer
  27 + *
  28 + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del docente_escala"})
  29 + * @ORM\Id
  30 + * @ORM\GeneratedValue(strategy="IDENTITY")
  31 + * @ORM\SequenceGenerator(sequenceName="docente_escala_id_seq", allocationSize=1, initialValue=1)
  32 + */
  33 + private $id;
  34 +
  35 + /**
  36 + * @var \AppBundle\Entity\RolInstitucion
  37 + *
  38 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion")
  39 + * @ORM\JoinColumns({
  40 + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false)
  41 + * })
  42 + */
  43 + protected $idRolInstitucion;
  44 +
  45 + /**
  46 + * @var \AppBundle\Entity\Escalafones
  47 + *
  48 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Escalafones")
  49 + * @ORM\JoinColumns({
  50 + * @ORM\JoinColumn(name="id_escala", referencedColumnName="id", nullable=false)
  51 + * })
  52 + */
  53 + protected $idEscala;
  54 +
  55 +
  56 +
  57 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de obtencion de la escala"})
  58 + /**
  59 + * @Assert\Date()
  60 + */
  61 + private $fecha_escala;
  62 +
  63 +
  64 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de registro de la escala"})
  65 + */
  66 + private $fecha_creacion;
  67 +
  68 +
  69 + /**
  70 + * Set idEscala
  71 + *
  72 + * @param \AppBundle\Entity\Escalafones $idEscala
  73 + * @return Usuarios
  74 + */
  75 + public function setidEscala(\AppBundle\Entity\Escalafones $idEscala = null)
  76 + {
  77 + $this->idEscala = $idEscala;
  78 +
  79 + return $this;
  80 + }
  81 +
  82 + /**
  83 + * Get idEscala
  84 + *
  85 + * @return \AppBundle\Entity\Escalafones
  86 + */
  87 + public function getidEscala()
  88 + {
  89 + return $this->idEscala;
  90 + }
  91 +
  92 + /**
  93 + * Get id
  94 + *
  95 + * @return integer
  96 + */
  97 + public function getId()
  98 + {
  99 + return $this->id;
  100 + }
  101 +
  102 +
  103 + /**
  104 + * @ORM\PrePersist
  105 + */
  106 + public function setFechaCreacion()
  107 + {
  108 + $this->fecha_creacion = new \DateTime();
  109 + }
  110 +
  111 + /**
  112 + * Set fecha_escala
  113 + *
  114 + * @param \DateTime $fecha_escala
  115 + * @return Comment
  116 + */
  117 +public function setFechaEscala($fecha_escala)
  118 +{
  119 + $this->fecha_escala = $fecha_escala;
  120 +
  121 + return $this;
  122 +}
  123 +
  124 +/**
  125 + * Get fecha_escala
  126 + *
  127 + * @return \DateTime
  128 + */
  129 +public function getFechaEscala()
  130 +{
  131 + return $this->postedon;
  132 +}
  133 +
  134 + /**
  135 + * Set idRolInstitucion
  136 + *
  137 + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion
  138 + * @return Usuarios
  139 + */
  140 + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion = null)
  141 + {
  142 + $this->idRolInstitucion = $idRolInstitucion;
  143 +
  144 + return $this;
  145 + }
  146 +
  147 + /**
  148 + * Get idRolInstitucion
  149 + *
  150 + * @return \AppBundle\Entity\RolInstitucion
  151 + */
  152 + public function getIdRolInstitucion()
  153 + {
  154 + return $this->idRolInstitucion;
  155 + }
  156 +
  157 +
  158 +
  159 +
  160 +
  161 +
  162 +
  163 +}
... ...
src/AppBundle/Entity/DocenteEscala.php~
... ... @@ -0,0 +1,185 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: Wilmer Ramones
  5 + * Date: 29/06/16
  6 + * Time: 07:52 AM
  7 + */
  8 +
  9 +namespace AppBundle\Entity;
  10 +
  11 +use Doctrine\ORM\Mapping as ORM;
  12 +use Symfony\Component\Validator\Constraints as Assert;
  13 +
  14 +/**
  15 + * Escalafones
  16 + *
  17 + * @ORM\Table(name="docente_escala")
  18 + * @ORM\Entity
  19 + * @ORM\HasLifecycleCallbacks()
  20 + */
  21 +class DocenteEscala
  22 +{
  23 +
  24 +
  25 + /**
  26 + * @var integer
  27 + *
  28 + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del docente_escala"})
  29 + * @ORM\Id
  30 + * @ORM\GeneratedValue(strategy="IDENTITY")
  31 + * @ORM\SequenceGenerator(sequenceName="docente_escala_id_seq", allocationSize=1, initialValue=1)
  32 + */
  33 + private $id;
  34 +
  35 + /**
  36 + * @var \AppBundle\Entity\RolInstitucion
  37 + *
  38 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion")
  39 + * @ORM\JoinColumns({
  40 + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false)
  41 + * })
  42 + */
  43 + protected $idRolInstitucion;
  44 +
  45 + /**
  46 + * @var \AppBundle\Entity\Escalafones
  47 + *
  48 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Escalafones")
  49 + * @ORM\JoinColumns({
  50 + * @ORM\JoinColumn(name="id_escala", referencedColumnName="id", nullable=false)
  51 + * })
  52 + */
  53 + protected $idEscala;
  54 +
  55 +
  56 +
  57 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de obtencion de la escala"})
  58 + /**
  59 + * @Assert\Date()
  60 + */
  61 + private $fecha_escala;
  62 +
  63 +
  64 + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de registro de la escala"})
  65 + */
  66 + private $fecha_creacion;
  67 +
  68 +
  69 + /**
  70 + * Set idEscala
  71 + *
  72 + * @param \AppBundle\Entity\Escalafones $idEscala
  73 + * @return Usuarios
  74 + */
  75 + public function setidEscala(\AppBundle\Entity\Escalafones $idEscala = null)
  76 + {
  77 + $this->idEscala = $idEscala;
  78 +
  79 + return $this;
  80 + }
  81 +
  82 + /**
  83 + * Get idEscala
  84 + *
  85 + * @return \AppBundle\Entity\Escalafones
  86 + */
  87 + public function getidEscala()
  88 + {
  89 + return $this->idEscala;
  90 + }
  91 +
  92 + /**
  93 + * Get id
  94 + *
  95 + * @return integer
  96 + */
  97 + public function getId()
  98 + {
  99 + return $this->id;
  100 + }
  101 +
  102 +
  103 + /**
  104 + * @ORM\PrePersist
  105 + */
  106 + public function setFechaCreacion()
  107 + {
  108 + $this->fecha_creacion = new \DateTime();
  109 + }
  110 +
  111 + /**
  112 + * Set fecha_escala
  113 + *
  114 + * @param \DateTime $fecha_escala
  115 + * @return Comment
  116 + */
  117 +public function setFechaEscala($fecha_escala)
  118 +{
  119 + $this->fecha_escala = $fecha_escala;
  120 +
  121 + return $this;
  122 +}
  123 +
  124 +/**
  125 + * Get fecha_escala
  126 + *
  127 + * @return \DateTime
  128 + */
  129 +public function getFechaEscala()
  130 +{
  131 + return $this->postedon;
  132 +}
  133 +
  134 + /**
  135 + * Set idRolInstitucion
  136 + *
  137 + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion
  138 + * @return Usuarios
  139 + */
  140 + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion = null)
  141 + {
  142 + $this->idRolInstitucion = $idRolInstitucion;
  143 +
  144 + return $this;
  145 + }
  146 +
  147 + /**
  148 + * Get idRolInstitucion
  149 + *
  150 + * @return \AppBundle\Entity\RolInstitucion
  151 + */
  152 + public function getIdRolInstitucion()
  153 + {
  154 + return $this->idRolInstitucion;
  155 + }
  156 +
  157 +
  158 +
  159 + /**
  160 + * Set idEscala
  161 + *
  162 + * @param \AppBundle\Entity\Escalafones $idEscala
  163 + * @return Usuarios
  164 + */
  165 + public function setIdEscala(\AppBundle\Entity\Escalafones $idEscala = null)
  166 + {
  167 + $this->idEscala = $idEscala;
  168 +
  169 + return $this;
  170 + }
  171 +
  172 + /**
  173 + * Get idEscala
  174 + *
  175 + * @return \AppBundle\Entity\Escalafones
  176 + */
  177 + public function getidEscala()
  178 + {
  179 + return $this->idEscala;
  180 + }
  181 +
  182 +
  183 +
  184 +
  185 +}
... ...
src/AppBundle/Entity/Escalafones.php
... ... @@ -34,7 +34,9 @@ class Escalafones
34 34 * @ORM\SequenceGenerator(sequenceName="escalafon_id_seq", allocationSize=1, initialValue=1)
35 35 */
36 36 private $id;
37   -
  37 +
  38 +
  39 +
38 40  
39 41  
40 42 /**
... ... @@ -79,6 +81,8 @@ class Escalafones
79 81 {
80 82 return $this->nombre;
81 83 }
  84 +
  85 +
82 86  
83 87  
84 88 }
... ...
src/AppBundle/Entity/Escalafones.php~
... ... @@ -0,0 +1,134 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: Wilmer Ramones
  5 + * Date: 29/06/16
  6 + * Time: 07:52 AM
  7 + */
  8 +
  9 +namespace AppBundle\Entity;
  10 +
  11 +use Doctrine\ORM\Mapping as ORM;
  12 +
  13 +/**
  14 + * Escalafones
  15 + *
  16 + * @ORM\Table(name="escalafones", uniqueConstraints={@ORM\UniqueConstraint(name="uq_nombre_escala", columns={"nombre"})})
  17 + * @ORM\Entity
  18 + */
  19 +class Escalafones
  20 +{
  21 + /**
  22 + * @var string
  23 + *
  24 + * @ORM\Column(name="nombre", type="string", length=50, nullable=false, options={"comment" = "Nombre del escalafon"})
  25 + */
  26 + private $nombre;
  27 +
  28 + /**
  29 + * @var integer
  30 + *
  31 + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del escalafon"})
  32 + * @ORM\Id
  33 + * @ORM\GeneratedValue(strategy="IDENTITY")
  34 + * @ORM\SequenceGenerator(sequenceName="escalafon_id_seq", allocationSize=1, initialValue=1)
  35 + */
  36 + private $id;
  37 +
  38 + /**
  39 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Adscripcion", inversedBy="escala")
  40 + * @ORM\JoinColumn(name="adscripcion_id", referencedColumnName="id")
  41 + */
  42 + protected $docente;
  43 +
  44 + /**
  45 + * Constructor
  46 + */
  47 + public function __construct()
  48 + {
  49 + $this->docente = new \Doctrine\Common\Collections\ArrayCollection();
  50 + }
  51 +
  52 +
  53 +
  54 + /**
  55 + * Set nombre
  56 + *
  57 + * @param string $nombre
  58 + * @return Escalafon
  59 + */
  60 + public function setNombre($nombre)
  61 + {
  62 + $this->nombre = $nombre;
  63 +
  64 + return $this;
  65 + }
  66 +
  67 + /**
  68 + * Get nombre
  69 + *
  70 + * @return string
  71 + */
  72 + public function getNombre()
  73 + {
  74 + return $this->nombre;
  75 + }
  76 +
  77 + /**
  78 + * Get id
  79 + *
  80 + * @return integer
  81 + */
  82 + public function getId()
  83 + {
  84 + return $this->id;
  85 + }
  86 +
  87 + /**
  88 + * Get nombre
  89 + *
  90 + * @return string
  91 + */
  92 + public function __toString()
  93 + {
  94 + return $this->nombre;
  95 + }
  96 +
  97 +
  98 +
  99 + /**
  100 + * Add docente
  101 + *
  102 + * @param \AppBundle\Entity\Adscripcion $docente
  103 + * @return Adscripcion
  104 + */
  105 + public function addDocente(\AppBundle\Entity\Adscripcion $docente)
  106 + {
  107 + $this->docente[] = $docente;
  108 +
  109 + return $this;
  110 + }
  111 +
  112 + /**
  113 + * Remove docente
  114 + *
  115 + * @param \AppBundle\Entity\Adscripcion $docente
  116 + */
  117 + public function removeDocente(\AppBundle\Entity\Adscripcion $docente)
  118 + {
  119 + $this->docente->removeElement($docente);
  120 + }
  121 +
  122 + /**
  123 + * Get docente
  124 + *
  125 + * @return \Doctrine\Common\Collections\Collection
  126 + */
  127 + public function getDocente()
  128 + {
  129 + return $this->docente;
  130 + }
  131 +
  132 +
  133 +
  134 +}
... ...
src/AppBundle/Entity/Usuarios.php
... ... @@ -20,7 +20,7 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
20 20 *
21 21 * @ORM\Table(name="usuarios", uniqueConstraints={@ORM\UniqueConstraint(name="usuarios_id_rol_institucion_key", columns={"id_rol_institucion"})})
22 22 * @ORM\Entity(repositoryClass="UsuariosRepository")
23   - * @UniqueEntity(fields="username", message="Username already taken")
  23 + * @UniqueEntity(fields="username", message="Nombre de usuario ya Existe")
24 24 */
25 25 class Usuarios implements UserInterface, \Serializable
26 26 {
... ... @@ -271,4 +271,4 @@ class Usuarios implements UserInterface, \Serializable
271 271 {
272 272 // TODO: Implement getSalt() method.
273 273 }
274   -}
275 274 \ No newline at end of file
  275 +}
... ...
src/AppBundle/Entity/Usuarios.php~
... ... @@ -0,0 +1,274 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: ubv-cipee
  5 + * Date: 29/06/16
  6 + * Time: 08:36 AM
  7 + */
  8 +
  9 +
  10 +
  11 +namespace AppBundle\Entity;
  12 +
  13 +use Doctrine\ORM\Mapping as ORM;
  14 +use Symfony\Component\Validator\Constraints as Assert;
  15 +use Symfony\Component\Security\Core\User\UserInterface;
  16 +use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  17 +
  18 +/**
  19 + * Usuarios
  20 + *
  21 + * @ORM\Table(name="usuarios", uniqueConstraints={@ORM\UniqueConstraint(name="usuarios_id_rol_institucion_key", columns={"id_rol_institucion"})})
  22 + * @ORM\Entity(repositoryClass="UsuariosRepository")
  23 + * @UniqueEntity(fields="username", message="Username already taken")
  24 + */
  25 +class Usuarios implements UserInterface, \Serializable
  26 +{
  27 + /**
  28 + * @var string
  29 + *
  30 + * @ORM\Column(name="username", type="string", length=255, nullable=false, options={"comment" = "nombre de usuariro"})
  31 + */
  32 + protected $username;
  33 +
  34 + /**
  35 + * @var string
  36 + *
  37 + * @ORM\Column(name="password", type="string", length=255, nullable=false, options={"comment" = "contraseña encryptada"})
  38 + */
  39 + protected $password;
  40 +
  41 + /**
  42 + * @Assert\NotBlank()
  43 + * @Assert\Length(max=4096)
  44 + */
  45 + private $plainPassword;
  46 +
  47 +
  48 +
  49 + /**
  50 + * @var integer
  51 + *
  52 + * @ORM\Column(name="id", type="integer", options={"comment" = "identificador de los usuarios"}, nullable=false)
  53 + * @ORM\Id
  54 + * @ORM\GeneratedValue(strategy="IDENTITY")
  55 + * @ORM\SequenceGenerator(sequenceName="usuarios_id_seq", allocationSize=1, initialValue=1)
  56 + */
  57 + protected $id;
  58 +
  59 + /**
  60 + * @var \AppBundle\Entity\RolInstitucion
  61 + *
  62 + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion")
  63 + * @ORM\JoinColumns({
  64 + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false)
  65 + * })
  66 + */
  67 + protected $idRolInstitucion;
  68 +
  69 + /**
  70 + * @var \Doctrine\Common\Collections\Collection
  71 + *
  72 + * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Role", inversedBy="user")
  73 + * @ORM\JoinTable(name="user_role",
  74 + * joinColumns={
  75 + * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
  76 + * },
  77 + * inverseJoinColumns={
  78 + * @ORM\JoinColumn(name="rol_id", referencedColumnName="id", nullable=false)
  79 + * }
  80 + * )
  81 + */
  82 + protected $rol;
  83 +
  84 + /**
  85 + * Constructor
  86 + */
  87 + public function __construct()
  88 + {
  89 + $this->rol = new \Doctrine\Common\Collections\ArrayCollection();
  90 + }
  91 +
  92 +
  93 + /**
  94 + * Set username
  95 + *
  96 + * @param string $username
  97 + * @return Usuarios
  98 + */
  99 + public function setUsername($username)
  100 + {
  101 + $this->username = $username;
  102 +
  103 + return $this;
  104 + }
  105 +
  106 + /**
  107 + * Get username
  108 + *
  109 + * @return string
  110 + */
  111 + public function getUsername()
  112 + {
  113 + return $this->username;
  114 + }
  115 +
  116 + /**
  117 + * Set password
  118 + *
  119 + * @param string $password
  120 + * @return Usuarios
  121 + */
  122 + public function setPassword($password)
  123 + {
  124 + $this->password = $password;
  125 +
  126 + return $this;
  127 + }
  128 +
  129 + /**
  130 + * Get password
  131 + *
  132 + * @return string
  133 + */
  134 + public function getPassword()
  135 + {
  136 + return $this->password;
  137 + }
  138 +
  139 +
  140 + /**
  141 + * Get id
  142 + *
  143 + * @return integer
  144 + */
  145 + public function getId()
  146 + {
  147 + return $this->id;
  148 + }
  149 +
  150 + /**
  151 + * Set idRolInstitucion
  152 + *
  153 + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion
  154 + * @return Usuarios
  155 + */
  156 + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion = null)
  157 + {
  158 + $this->idRolInstitucion = $idRolInstitucion;
  159 +
  160 + return $this;
  161 + }
  162 +
  163 + /**
  164 + * Get idRolInstitucion
  165 + *
  166 + * @return \AppBundle\Entity\RolInstitucion
  167 + */
  168 + public function getIdRolInstitucion()
  169 + {
  170 + return $this->idRolInstitucion;
  171 + }
  172 +
  173 + /**
  174 + * Add rol
  175 + *
  176 + * @param \AppBundle\Entity\Role $rol
  177 + * @return Role
  178 + */
  179 + public function addRol(\AppBundle\Entity\Role $rol)
  180 + {
  181 + $this->rol[] = $rol;
  182 +
  183 + return $this;
  184 + }
  185 +
  186 + /**
  187 + * Remove rol
  188 + *
  189 + * @param \AppBundle\Entity\Role $rol
  190 + */
  191 + public function removeRol(\AppBundle\Entity\Role $rol)
  192 + {
  193 + $this->rol->removeElement($rol);
  194 + }
  195 +
  196 + /**
  197 + * Get rol
  198 + *
  199 + * @return \Doctrine\Common\Collections\Collection
  200 + */
  201 + public function getRol()
  202 + {
  203 + return $this->rol;
  204 + }
  205 +
  206 +
  207 + public function getRoles()
  208 + {
  209 + return $this->rol->toArray(); /*IMPORTANTE: el mecanismo de seguridad de Sf2 requiere ésto como un array*/
  210 + }
  211 +
  212 + public function equals(UserInterface $user) {
  213 + return md5($this->getUsername()) == md5($user->getUsername());
  214 +
  215 + }
  216 +
  217 + /**
  218 + * Erases the user credentials.
  219 + */
  220 + public function eraseCredentials() {
  221 +
  222 + }
  223 +
  224 + public function serialize()
  225 + {
  226 + /*
  227 + * ! Don't serialize $roles field !
  228 + */
  229 + return \serialize(array(
  230 + $this->id,
  231 + $this->username,
  232 + $this->password,
  233 + ));
  234 + }
  235 +
  236 + /**
  237 + * @see \Serializable::unserialize()
  238 + */
  239 + public function unserialize($serialized)
  240 + {
  241 + list (
  242 + $this->id,
  243 + $this->username,
  244 + $this->password,
  245 + ) = \unserialize($serialized);
  246 + }
  247 +
  248 + public function __toString() {
  249 + return $this->getuserName();
  250 + }
  251 +
  252 + public function getPlainPassword()
  253 + {
  254 + return $this->plainPassword;
  255 + }
  256 +
  257 + public function setPlainPassword($password)
  258 + {
  259 + $this->plainPassword = $password;
  260 + }
  261 +
  262 +
  263 + /**
  264 + * Returns the salt that was originally used to encode the password.
  265 + *
  266 + * This can return null if the password was not encoded using a salt.
  267 + *
  268 + * @return string|null The salt
  269 + */
  270 + public function getSalt()
  271 + {
  272 + // TODO: Implement getSalt() method.
  273 + }
  274 +}
0 275 \ No newline at end of file
... ...
src/AppBundle/Form/UserType.php
... ... @@ -9,8 +9,7 @@
9 9 namespace AppBundle\Form;
10 10  
11 11  
12   -use Symfony\Component\Form\FormEvent;
13   -use Symfony\Component\Form\FormEvents;
  12 +
14 13 use Symfony\Component\Form\AbstractType;
15 14 use Symfony\Component\Form\FormBuilderInterface;
16 15 use Symfony\Component\OptionsResolver\OptionsResolver;
... ... @@ -18,7 +17,7 @@ use Symfony\Component\Form\Extension\Core\Type\EmailType;
18 17 use Symfony\Component\Form\Extension\Core\Type\BirthdayType;
19 18 use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
20 19 use Symfony\Component\Form\Extension\Core\Type\FileType;
21   -use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  20 +use Symfony\Component\Form\Extension\Core\Type\SubmitType;
22 21 use Symfony\Bridge\Doctrine\Form\Type\EntityType;
23 22  
24 23 class UserType extends AbstractType
... ... @@ -26,33 +25,39 @@ class UserType extends AbstractType
26 25 public function buildForm(FormBuilderInterface $builder, array $options)
27 26 {
28 27 $builder
29   - ->add('fecha_ingreso', BirthdayType::class, array(
30   - 'label' => 'Fecha de Ingreso UBV',
31   - ))
  28 + /* ->add('fecha_ingreso', BirthdayType::class, array(
  29 + 'label' => 'Fecha de Ingreso UBV',
  30 + ))*/
32 31 ->add('trabajo', FileType::class, array('label' => 'Digital Constancia Trabajo'))
33   - ->add('oposicion', CheckboxType::class, array(
  32 + ->add('pregrado', FileType::class, array('label' => 'Digital Título de Pregrado'))
  33 +
  34 + ->add('postgrado', FileType::class, array('label' => 'Digital Título de Postgrado','required' => false))
  35 + /*->add('oposicion', CheckboxType::class, array(
34 36 'label' => '¿Tiene Concurso de Oposición?',
35 37 'required' => false,
36   - ))
37   - ->add('escalafones', EntityType::class, array(
  38 + ))*/
  39 + ->add('escala', EntityType::class, array(
38 40 'label' => false,
39 41 'placeholder' => 'Seleccione escala a la que concurso',
40   - 'attr' => array(
  42 + 'required' => false,
  43 + /*'attr' => array(
41 44 'class' => 'esc_oposicion'
42   - ),
  45 + ),*/
43 46 'class' => 'AppBundle:Escalafones',
44 47 'choice_label' => 'getNombre',
45 48 ))
46 49 ->add('fecha_oposicion', BirthdayType::class, array(
47 50 'label' => 'fecha Concurso',
48   - 'label_attr' => array( 'class' => 'esc_oposicion'),
49   - 'attr' => array(
  51 + //'label_attr' => array( 'class' => 'esc_oposicion'),
  52 + 'required' => false,
  53 + /* 'attr' => array(
50 54 'class' => 'esc_oposicion'
51   - )
  55 + )*/
52 56 ))
53   - ->add('documento_oposicion', FileType::class, array(
  57 + /*->add('documento_oposicion', FileType::class, array(
54 58 'label' => 'Digital Documento Oposición',
55 59 'label_attr' => array( 'class' => 'esc_oposicion'),
  60 + 'required' => false,
56 61 'attr' => array(
57 62 'style' => 'display:none;',
58 63 'class' => 'esc_oposicion'
... ... @@ -64,6 +69,7 @@ class UserType extends AbstractType
64 69 'class' => 'esc_oposicion'
65 70 ),
66 71 'placeholder' => 'Seleccione Area de Investigacion',
  72 + 'required' => false,
67 73 'class' => 'AppBundle:AreasInvestigacion',
68 74 'choice_label' => 'getNombre',
69 75 ))
... ... @@ -75,13 +81,74 @@ class UserType extends AbstractType
75 81 'class' => 'esc_oposicion'
76 82 )
77 83 ))
78   -
  84 + //Ascensos:
  85 + //Asistente
  86 + ->add('fecha_ascenso_asistente', BirthdayType::class, array(
  87 + 'label' => 'fecha ascenso ASISTENTE',
  88 + 'required' => false,
  89 + 'label_attr' => array( 'class' => 'esc_asistente'),
  90 + 'attr' => array(
  91 + 'class' => 'esc_asistente'
  92 + )
  93 + ))
  94 +
  95 + ->add('documento_asistente', FileType::class, array(
  96 + 'label' => 'Digital Documento Asistente',
  97 + 'label_attr' => array( 'class' => 'esc_asistente'),
  98 + 'required' => false,
  99 + 'attr' => array(
  100 + 'style' => 'display:none;',
  101 + 'class' => 'esc_asistente'
  102 + )
  103 + ))
  104 +
  105 + ->add('ascenso2', CheckboxType::class, array(
  106 + 'label' => '¿otro Ascenso?',
  107 + 'label_attr' => array( 'class' => 'esc_asistente'),
  108 + 'required' => false,
  109 + 'attr' => array(
  110 + 'class' => 'esc_asistente'
  111 + )
  112 + ))
  113 +
  114 + //Agregado
  115 + ->add('fecha_ascenso_agregado', BirthdayType::class, array(
  116 + 'label' => 'fecha ascenso AGREGADO',
  117 + 'label_attr' => array( 'class' => 'esc_agregado'),
  118 + 'required' => false,
  119 + 'attr' => array(
  120 + 'class' => 'esc_agregado'
  121 + )
  122 + ))
  123 +
  124 + ->add('documento_agregado', FileType::class, array(
  125 + 'label' => 'Digital Documento agregado',
  126 + 'label_attr' => array( 'class' => 'esc_agregado'),
  127 + 'required' => false,
  128 + 'attr' => array(
  129 + 'style' => 'display:none;',
  130 + 'class' => 'esc_agregado'
  131 + )
  132 + ))
  133 +
  134 + ->add('ascenso3', CheckboxType::class, array(
  135 + 'label' => '¿Otro Ascenso?',
  136 + 'label_attr' => array( 'class' => 'esc_agregado'),
  137 + 'required' => false,
  138 + 'attr' => array(
  139 + 'class' => 'esc_agregado'
  140 + )
  141 + ))*/
  142 +
  143 + ->add('send', SubmitType::class, array('label' => 'Enviar Solicitud'));
79 144  
80 145  
81 146 ;
82 147  
83 148  
84 149 }
  150 +
  151 +
85 152  
86 153  
87   -}
88 154 \ No newline at end of file
  155 +}
... ...
src/AppBundle/Form/UserType.php~
... ... @@ -0,0 +1,154 @@
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * User: ubv-cipee
  5 + * Date: 29/06/16
  6 + * Time: 09:07 AM
  7 + */
  8 +
  9 +namespace AppBundle\Form;
  10 +
  11 +
  12 +
  13 +use Symfony\Component\Form\AbstractType;
  14 +use Symfony\Component\Form\FormBuilderInterface;
  15 +use Symfony\Component\OptionsResolver\OptionsResolver;
  16 +use Symfony\Component\Form\Extension\Core\Type\EmailType;
  17 +use Symfony\Component\Form\Extension\Core\Type\BirthdayType;
  18 +use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  19 +use Symfony\Component\Form\Extension\Core\Type\FileType;
  20 +use Symfony\Component\Form\Extension\Core\Type\SubmitType;
  21 +use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  22 +
  23 +class UserType extends AbstractType
  24 +{
  25 + public function buildForm(FormBuilderInterface $builder, array $options)
  26 + {
  27 + $builder
  28 + /* ->add('fecha_ingreso', BirthdayType::class, array(
  29 + 'label' => 'Fecha de Ingreso UBV',
  30 + ))*/
  31 + ->add('trabajo', FileType::class, array('label' => 'Digital Constancia Trabajo'))
  32 + ->add('pregrado', FileType::class, array('label' => 'Digital Título de Pregrado'))
  33 +
  34 + ->add('postgrado', FileType::class, array('label' => 'Digital Título de Postgrado','required' => false))
  35 + /*->add('oposicion', CheckboxType::class, array(
  36 + 'label' => '¿Tiene Concurso de Oposición?',
  37 + 'required' => false,
  38 + ))*/
  39 + ->add('escala', EntityType::class, array(
  40 + 'label' => false,
  41 + 'placeholder' => 'Seleccione escala a la que concurso',
  42 + 'required' => false,
  43 + /*'attr' => array(
  44 + 'class' => 'esc_oposicion'
  45 + ),*/
  46 + 'class' => 'AppBundle:Escalafones',
  47 + 'choice_label' => 'getNombre',
  48 + ))
  49 + ->add('fecha_oposicion', BirthdayType::class, array(
  50 + 'label' => 'fecha Concurso',
  51 + 'label_attr' => array( 'class' => 'esc_oposicion'),
  52 + 'required' => false,
  53 + /* 'attr' => array(
  54 + 'class' => 'esc_oposicion'
  55 + )*/
  56 + ))
  57 + /*->add('documento_oposicion', FileType::class, array(
  58 + 'label' => 'Digital Documento Oposición',
  59 + 'label_attr' => array( 'class' => 'esc_oposicion'),
  60 + 'required' => false,
  61 + 'attr' => array(
  62 + 'style' => 'display:none;',
  63 + 'class' => 'esc_oposicion'
  64 + )
  65 + ))
  66 + ->add('area_investigacion', EntityType::class, array(
  67 + 'label' => false,
  68 + 'attr' => array(
  69 + 'class' => 'esc_oposicion'
  70 + ),
  71 + 'placeholder' => 'Seleccione Area de Investigacion',
  72 + 'required' => false,
  73 + 'class' => 'AppBundle:AreasInvestigacion',
  74 + 'choice_label' => 'getNombre',
  75 + ))
  76 + ->add('ascenso', CheckboxType::class, array(
  77 + 'label' => '¿Ha tenido Ascenso luego del Concurso?',
  78 + 'label_attr' => array( 'class' => 'esc_oposicion'),
  79 + 'required' => false,
  80 + 'attr' => array(
  81 + 'class' => 'esc_oposicion'
  82 + )
  83 + ))
  84 + //Ascensos:
  85 + //Asistente
  86 + ->add('fecha_ascenso_asistente', BirthdayType::class, array(
  87 + 'label' => 'fecha ascenso ASISTENTE',
  88 + 'required' => false,
  89 + 'label_attr' => array( 'class' => 'esc_asistente'),
  90 + 'attr' => array(
  91 + 'class' => 'esc_asistente'
  92 + )
  93 + ))
  94 +
  95 + ->add('documento_asistente', FileType::class, array(
  96 + 'label' => 'Digital Documento Asistente',
  97 + 'label_attr' => array( 'class' => 'esc_asistente'),
  98 + 'required' => false,
  99 + 'attr' => array(
  100 + 'style' => 'display:none;',
  101 + 'class' => 'esc_asistente'
  102 + )
  103 + ))
  104 +
  105 + ->add('ascenso2', CheckboxType::class, array(
  106 + 'label' => '¿otro Ascenso?',
  107 + 'label_attr' => array( 'class' => 'esc_asistente'),
  108 + 'required' => false,
  109 + 'attr' => array(
  110 + 'class' => 'esc_asistente'
  111 + )
  112 + ))
  113 +
  114 + //Agregado
  115 + ->add('fecha_ascenso_agregado', BirthdayType::class, array(
  116 + 'label' => 'fecha ascenso AGREGADO',
  117 + 'label_attr' => array( 'class' => 'esc_agregado'),
  118 + 'required' => false,
  119 + 'attr' => array(
  120 + 'class' => 'esc_agregado'
  121 + )
  122 + ))
  123 +
  124 + ->add('documento_agregado', FileType::class, array(
  125 + 'label' => 'Digital Documento agregado',
  126 + 'label_attr' => array( 'class' => 'esc_agregado'),
  127 + 'required' => false,
  128 + 'attr' => array(
  129 + 'style' => 'display:none;',
  130 + 'class' => 'esc_agregado'
  131 + )
  132 + ))
  133 +
  134 + ->add('ascenso3', CheckboxType::class, array(
  135 + 'label' => '¿Otro Ascenso?',
  136 + 'label_attr' => array( 'class' => 'esc_agregado'),
  137 + 'required' => false,
  138 + 'attr' => array(
  139 + 'class' => 'esc_agregado'
  140 + )
  141 + ))*/
  142 +
  143 + ->add('send', SubmitType::class, array('label' => 'Enviar Solicitud'));
  144 +
  145 +
  146 + ;
  147 +
  148 +
  149 + }
  150 +
  151 +
  152 +
  153 +
  154 +}
... ...
web/config.php
... ... @@ -120,7 +120,7 @@ $minorProblems = $symfonyRequirements-&gt;getFailedRecommendations();
120 120 <div id="content">
121 121 <div class="header clear-fix">
122 122 <div class="header-logo">
123   - <img src="bundles/framework/images/portal/logo_symfony.png" alt="Symfony" />
  123 + <img src="bundles/framework/images/logo_symfony.png" alt="Symfony" />
124 124 </div>
125 125  
126 126 <div class="search">
... ...
web/uploads/adscripcion/0f73622d80d47d2b14626adb569b6ce4.pdf
No preview for this file type
web/uploads/adscripcion/272c38f8ae45950d92c0124ba5fad4ba.pdf
No preview for this file type
web/uploads/adscripcion/48ea9e6b16711dc1d828ef68c677fd3f.pdf
No preview for this file type
web/uploads/adscripcion/6136ca9e761a3599b2a77ebee65c8b2a.pdf
No preview for this file type
web/uploads/adscripcion/8c950955bd236e465e905833e69599f5.pdf
No preview for this file type
web/uploads/adscripcion/e368295d84924b1576f0003a2412f65b.pdf
No preview for this file type