Commit bbbfd8f3e89077a6aa9fa0f8195c65c74401c7ec
1 parent
52becd62ed
Exists in
master
añade los mensajes cuando es exitoso al index de las solicitudes docentes
Showing
2 changed files
with
69 additions
and
0 deletions
Show diff stats
app/Resources/views/solicitudes/index.html.twig
| @@ -9,6 +9,10 @@ | @@ -9,6 +9,10 @@ | ||
| 9 | {% for message in app.session.flashBag.get('notice') %} | 9 | {% for message in app.session.flashBag.get('notice') %} |
| 10 | <div class="alert alert-warning">{{ message }}</div> | 10 | <div class="alert alert-warning">{{ message }}</div> |
| 11 | {%endfor %} | 11 | {%endfor %} |
| 12 | + | ||
| 13 | + {% for message in app.session.flashBag.get('success') %} | ||
| 14 | + <div class="alert alert-success">{{ message }}</div> | ||
| 15 | + {%endfor %} | ||
| 12 | 16 | ||
| 13 | {% for message in app.session.flashBag.get('danger') %} | 17 | {% for message in app.session.flashBag.get('danger') %} |
| 14 | <div class="alert alert-danger">{{ message }}</div> | 18 | <div class="alert alert-danger">{{ message }}</div> |
src/AppBundle/Form/PermisoSabaticoType.php
| @@ -0,0 +1,65 @@ | @@ -0,0 +1,65 @@ | ||
| 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\Form\AbstractType; | ||
| 13 | +use Symfony\Component\Form\FormBuilderInterface; | ||
| 14 | +use Symfony\Component\OptionsResolver\OptionsResolver; | ||
| 15 | +use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
| 16 | + | ||
| 17 | +use Symfony\Component\Validator\Constraints\File; | ||
| 18 | +use Symfony\Component\Validator\Constraints\NotBlank; | ||
| 19 | +use Symfony\Component\Form\Extension\Core\Type\FileType; | ||
| 20 | + | ||
| 21 | +use Symfony\Bridge\Doctrine\Form\Type\EntityType; | ||
| 22 | + | ||
| 23 | +class ReconocimientoEscalaType extends AbstractType | ||
| 24 | +{ | ||
| 25 | + public function buildForm(FormBuilderInterface $builder, array $options) | ||
| 26 | + { | ||
| 27 | + $builder | ||
| 28 | + | ||
| 29 | + ->add('reconocimiento', FileType::class, array( | ||
| 30 | + 'label' => 'Digital Aprobación de Escala', | ||
| 31 | + 'constraints' => array( | ||
| 32 | + new NotBlank(), | ||
| 33 | + new File(array( | ||
| 34 | + 'maxSize' => '1024K', | ||
| 35 | + 'mimeTypes' => [ | ||
| 36 | + 'application/pdf', | ||
| 37 | + 'application/x-pdf', | ||
| 38 | + 'image/png', | ||
| 39 | + 'image/jpg', | ||
| 40 | + 'image/jpeg' | ||
| 41 | + ], | ||
| 42 | + 'mimeTypesMessage' => 'Sólo se permiten extensiones png, jpeg y pdf' | ||
| 43 | + )) | ||
| 44 | + ) | ||
| 45 | + )) | ||
| 46 | + ->add('send', SubmitType::class, array( | ||
| 47 | + 'label' => 'Enviar reconocimiento de Escala', | ||
| 48 | + 'attr' => array( | ||
| 49 | + 'class' => 'btn btn-success btn-block', | ||
| 50 | + 'data-loading-text' => "<i class='fa fa-circle-o-notch fa-spin'></i> Procesando Solicitud..." | ||
| 51 | + ) | ||
| 52 | + )) | ||
| 53 | + | ||
| 54 | + ; | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + | ||
| 61 | + | ||
| 62 | + | ||
| 63 | + | ||
| 64 | + | ||
| 65 | +} |