3 namespace Rapsys\AirBundle\Form
; 
   5 use Symfony\Component\Form\AbstractType
; 
   6 use Symfony\Component\Form\FormBuilderInterface
; 
   7 use Symfony\Component\OptionsResolver\OptionsResolver
; 
   8 use Symfony\Component\Form\Extension\Core\Type\TextareaType
; 
   9 use Symfony\Component\Form\Extension\Core\Type\ChoiceType
; 
  10 use Symfony\Component\Form\Extension\Core\Type\TextType
; 
  11 use Symfony\Component\Form\Extension\Core\Type\SubmitType
; 
  12 use Symfony\Component\Validator\Constraints\NotBlank
; 
  14 class DisputeType 
extends AbstractType 
{ 
  18         public function buildForm(FormBuilderInterface 
$builder, array $options) { 
  20                         ->add('offense', ChoiceType
::class, ['choices' => ['Forbidden gathering' => 'gathering', 'Traffic at prohibited time' => 'traffic'/*, 'Traffic at prohibited location' => 'location'*/], 'attr' => ['placeholder' => 'Your offense'], 'constraints' => [new NotBlank(['message' => 'Please provide your offense'])]]) 
  21                         ->add('court', TextType
::class, ['label' => 'Court city', 'attr' => ['placeholder' => 'Your court city'], 'constraints' => [new NotBlank(['message' => 'Please provide your court city'])]]) 
  22                         ->add('notice', TextType
::class, ['label' => 'Notice number', 'attr' => ['placeholder' => 'Your notice number'], 'constraints' => [new NotBlank(['message' => 'Please provide your notice'])]]) 
  23                         ->add('agent', TextType
::class, ['label' => 'Agent number', 'attr' => ['placeholder' => 'Your agent number'], 'constraints' => [new NotBlank(['message' => 'Please provide your agent'])]]) 
  24                         ->add('service', TextType
::class, ['label' => 'Service code', 'attr' => ['placeholder' => 'Your service code'], 'constraints' => [new NotBlank(['message' => 'Please provide your service'])]]) 
  25                         ->add('abstract', TextareaType
::class, ['attr' => ['placeholder' => 'Your abstract', 'cols' => 50, 'rows' => 15], 'constraints' => []]) 
  26                         ->add('submit', SubmitType
::class, ['label' => 'Send', 'attr' => ['class' => 'submit']]); 
  32         public function configureOptions(OptionsResolver 
$resolver) { 
  33                 $resolver->setDefaults(['error_bubbling' => true]); 
  39         public function getName() { 
  40                 return 'dispute_form';