Commit 264818550f6c33e03f3bdb53b9e45df21ada4d9b
1 parent
583eb411bd
Exists in
master
creada la entidad pida plazo para los plazos de las tareas
Showing
2 changed files
with
115 additions
and
9 deletions
Show diff stats
src/AppBundle/Entity/PidaPlazo.php
@@ -0,0 +1,107 @@ | @@ -0,0 +1,107 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: ubv-cipee | ||
5 | + * Date: 29/06/16 | ||
6 | + * Time: 08:12 AM | ||
7 | + */ | ||
8 | + | ||
9 | + | ||
10 | +namespace AppBundle\Entity; | ||
11 | + | ||
12 | +use Doctrine\ORM\Mapping as ORM; | ||
13 | + | ||
14 | +/** | ||
15 | + * PidaPlazo | ||
16 | + * | ||
17 | + * @ORM\Table(name="pida_plazo", uniqueConstraints={@ORM\UniqueConstraint(name="uq_pida_plazo", columns={"nombre"})}) | ||
18 | + * @ORM\Entity | ||
19 | + */ | ||
20 | +class PidaPlazo | ||
21 | +{ | ||
22 | + /** | ||
23 | + * @var string | ||
24 | + * | ||
25 | + * @ORM\Column(name="nombre", type="string", length=20, nullable=false, options={"comment" = "Nombre del estatus"}) | ||
26 | + */ | ||
27 | + private $nombre; | ||
28 | + | ||
29 | + /** | ||
30 | + * @var string | ||
31 | + * | ||
32 | + * @ORM\Column(name="descripcion", type="string", length=50, nullable=false, options={"comment" = "Descripcion o significado del estatus"}) | ||
33 | + */ | ||
34 | + private $descripcion; | ||
35 | + | ||
36 | + /** | ||
37 | + * @var integer | ||
38 | + * | ||
39 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador del estatus"}) | ||
40 | + * @ORM\Id | ||
41 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
42 | + * @ORM\SequenceGenerator(sequenceName="estatus_id_seq", allocationSize=1, initialValue=1) | ||
43 | + */ | ||
44 | + private $id; | ||
45 | + | ||
46 | + | ||
47 | + | ||
48 | + /** | ||
49 | + * Set nombre | ||
50 | + * | ||
51 | + * @param string $nombre | ||
52 | + * @return Estatus | ||
53 | + */ | ||
54 | + public function setNombre($nombre) | ||
55 | + { | ||
56 | + $this->nombre = $nombre; | ||
57 | + | ||
58 | + return $this; | ||
59 | + } | ||
60 | + | ||
61 | + /** | ||
62 | + * Get nombre | ||
63 | + * | ||
64 | + * @return string | ||
65 | + */ | ||
66 | + public function getNombre() | ||
67 | + { | ||
68 | + return $this->nombre; | ||
69 | + } | ||
70 | + | ||
71 | + /** | ||
72 | + * Set descripcion | ||
73 | + * | ||
74 | + * @param string $descripcion | ||
75 | + * @return Estatus | ||
76 | + */ | ||
77 | + public function setDescripcion($descripcion) | ||
78 | + { | ||
79 | + $this->descripcion = $descripcion; | ||
80 | + | ||
81 | + return $this; | ||
82 | + } | ||
83 | + | ||
84 | + /** | ||
85 | + * Get descripcion | ||
86 | + * | ||
87 | + * @return string | ||
88 | + */ | ||
89 | + public function getDescripcion() | ||
90 | + { | ||
91 | + return $this->descripcion; | ||
92 | + } | ||
93 | + | ||
94 | + /** | ||
95 | + * Get id | ||
96 | + * | ||
97 | + * @return integer | ||
98 | + */ | ||
99 | + public function getId() | ||
100 | + { | ||
101 | + return $this->id; | ||
102 | + } | ||
103 | + | ||
104 | + public function __toString() { | ||
105 | + return $this->getNombre(); | ||
106 | + } | ||
107 | +} | ||
0 | \ No newline at end of file | 108 | \ No newline at end of file |
src/AppBundle/Form/PidaType.php
@@ -12,9 +12,10 @@ namespace AppBundle\Form; | @@ -12,9 +12,10 @@ namespace AppBundle\Form; | ||
12 | use Symfony\Component\Form\AbstractType; | 12 | use Symfony\Component\Form\AbstractType; |
13 | use Symfony\Component\Form\FormBuilderInterface; | 13 | use Symfony\Component\Form\FormBuilderInterface; |
14 | use Symfony\Component\OptionsResolver\OptionsResolver; | 14 | use Symfony\Component\OptionsResolver\OptionsResolver; |
15 | -use Symfony\Component\Form\Extension\Core\Type\SubmitType; | 15 | + |
16 | 16 | ||
17 | use Symfony\Bridge\Doctrine\Form\Type\EntityType; | 17 | use Symfony\Bridge\Doctrine\Form\Type\EntityType; |
18 | +use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
18 | 19 | ||
19 | class PidaType extends AbstractType | 20 | class PidaType extends AbstractType |
20 | { | 21 | { |
@@ -23,7 +24,7 @@ class PidaType extends AbstractType | @@ -23,7 +24,7 @@ class PidaType extends AbstractType | ||
23 | $builder | 24 | $builder |
24 | 25 | ||
25 | ->add('id_plan_historico_nacional_estrategico', EntityType::class, array( | 26 | ->add('id_plan_historico_nacional_estrategico', EntityType::class, array( |
26 | - 'label' => false, | 27 | + 'label' => 'Objetivos Históricos', |
27 | 'attr' => array( | 28 | 'attr' => array( |
28 | 'class' => 'select2' | 29 | 'class' => 'select2' |
29 | ), | 30 | ), |
@@ -35,7 +36,7 @@ class PidaType extends AbstractType | @@ -35,7 +36,7 @@ class PidaType extends AbstractType | ||
35 | )) | 36 | )) |
36 | 37 | ||
37 | ->add('id_actividad_docente', EntityType::class, array( | 38 | ->add('id_actividad_docente', EntityType::class, array( |
38 | - 'label' => false, | 39 | + 'label' => 'Actividad Docente', |
39 | 'attr' => array( | 40 | 'attr' => array( |
40 | 'class' => 'select2' | 41 | 'class' => 'select2' |
41 | ), | 42 | ), |
@@ -47,16 +48,14 @@ class PidaType extends AbstractType | @@ -47,16 +48,14 @@ class PidaType extends AbstractType | ||
47 | 48 | ||
48 | )) | 49 | )) |
49 | 50 | ||
50 | - ->add('objetivo_especifico') | 51 | + ->add('objetivo_especifico', TextType::class, array( |
52 | + 'label' => 'Tarea' | ||
53 | + )) | ||
51 | 54 | ||
52 | ->add('fecha_inicio') | 55 | ->add('fecha_inicio') |
53 | 56 | ||
54 | ->add('fecha_final') | 57 | ->add('fecha_final') |
55 | - | ||
56 | - ->add('send', SubmitType::class, array( | ||
57 | - 'label' => 'Enviar Actividad PIDA', | ||
58 | - 'attr' => array('class' => 'btn btn-success btn-block') | ||
59 | - )) | 58 | + |
60 | 59 | ||
61 | ; | 60 | ; |
62 | 61 |