src/Form/ResetPassFormType.php line 18

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 EWZ\Bundle\RecaptchaBundle\Form\Type\EWZRecaptchaType;
  13. use EWZ\Bundle\RecaptchaBundle\Validator\Constraints\IsTrue as RecaptchaTrue;
  14. class ResetPassFormType extends AbstractType
  15. {
  16.     public function buildForm(FormBuilderInterface $builder, array $options)
  17.     {
  18.         $builder
  19.             ->add('email'EmailType::class,
  20.                 [
  21.                     'label' => false,
  22.                     'attr' => ['placeholder' => 'Wpisz adres e-mail na którym zostało stworzone konto....'],
  23.                 ])
  24.            ;
  25.     }
  26.     public function configureOptions(OptionsResolver $resolver)
  27.     {
  28.         $resolver->setDefaults([
  29.             // enable/disable CSRF protection for this form
  30.             'csrf_protection' => true,
  31.             // the name of the hidden HTML field that stores the token
  32.             'csrf_field_name' => '_token',
  33.             // an arbitrary string used to generate the value of the token
  34.             // using a different string for each form improves its security
  35.             'csrf_token_id' => 'pass_reset',
  36.         ]);
  37.     }
  38. }