src/Form/ResetPassFormType.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Form;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\PasswordType;
  5. use Symfony\Component\Form\Extension\Core\Type\EmailType;
  6. use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
  7. use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
  8. use Symfony\Component\Form\FormBuilderInterface;
  9. use Symfony\Component\OptionsResolver\OptionsResolver;
  10. use Symfony\Component\Validator\Constraints\NotBlank;
  11. use Symfony\Component\Validator\Constraints\Length;
  12. use Symfony\Component\Validator\Constraints\Regex;
  13. use EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType;
  14. use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrue as RecaptchaTrue;
  15. class ResetPassFormType extends AbstractType
  16. {
  17. public function buildForm(FormBuilderInterface $builder, array $options)
  18. {
  19. $builder
  20. ->add('email', EmailType::class,
  21. [
  22. 'label' => false,
  23. 'attr' => ['placeholder' => 'Wpisz adres e-mail na którym zostało stworzone konto....'],
  24. ])
  25. ;
  26. }
  27. public function configureOptions(OptionsResolver $resolver)
  28. {
  29. $resolver->setDefaults([
  30. // enable/disable CSRF protection for this form
  31. 'csrf_protection' => true,
  32. // the name of the hidden HTML field that stores the token
  33. 'csrf_field_name' => '_token',
  34. // an arbitrary string used to generate the value of the token
  35. // using a different string for each form improves its security
  36. 'csrf_token_id' => 'pass_reset',
  37. ]);
  38. }
  39. }