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\CheckboxType
;
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) {
21 ->add('offense', ChoiceType
::class, ['choices' => ['Forbidden gathering' => 'gathering', 'Traffic at prohibited time' => 'traffic'], 'attr' => ['placeholder' => 'Your offense'], 'constraints' => [new NotBlank(['message' => 'Please provide your offense'])]])
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('mask', CheckboxType
::class, ['label' => 'Mask worn', 'attr' => ['placeholder' => 'Your mask worn'], 'constraints' => [new NotBlank(['message' => 'Please provide your mask'])]])
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';