From 8140672f6bd078460cde6c3c8a62f93ab64a2c8d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 14 Oct 2025 12:37:05 +0200 Subject: [PATCH] Remove useless form --- Form/ContactType.php | 61 -------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 Form/ContactType.php diff --git a/Form/ContactType.php b/Form/ContactType.php deleted file mode 100644 index 6f9faeb..0000000 --- a/Form/ContactType.php +++ /dev/null @@ -1,61 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Rapsys\BlogBundle\Form; - -use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\OptionsResolver\OptionsResolver; -use Symfony\Component\Form\Extension\Core\Type\TextType; -use Symfony\Component\Form\Extension\Core\Type\TextareaType; -use Symfony\Component\Form\Extension\Core\Type\EmailType; -use Symfony\Component\Form\Extension\Core\Type\SubmitType; -use Symfony\Component\Validator\Constraints\Email; -use Symfony\Component\Validator\Constraints\NotBlank; - -use Rapsys\BlogBundle\RapsysBlogBundle; - -use Rapsys\PackBundle\Form\CaptchaType; - -/** - * {@inheritdoc} - */ -class ContactType extends CaptchaType { - /** - * {@inheritdoc} - */ - public function buildForm(FormBuilderInterface $builder, array $options): void { - //Add fields - $builder - ->add('name', TextType::class, ['attr' => ['placeholder' => 'Your name'], 'constraints' => [new NotBlank(['message' => 'Please provide your name'])]]) - ->add('subject', TextType::class, ['attr' => ['placeholder' => 'Subject'], 'constraints' => [new NotBlank(['message' => 'Please provide your subject'])]]) - ->add('mail', EmailType::class, ['attr' => ['placeholder' => 'Your mail'], 'constraints' => [new NotBlank(['message' => 'Please provide a valid mail']), new Email(['message' => 'Your mail doesn\'t seems to be valid'])]]) - ->add('message', TextareaType::class, ['attr' => ['placeholder' => 'Your message', 'cols' => 50, 'rows' => 15], 'constraints' => [new NotBlank(['message' => 'Please provide your message'])]]) - ->add('submit', SubmitType::class, ['label' => 'Send', 'attr' => ['class' => 'submit']]); - - //Call parent - parent::buildForm($builder, $options); - } - - /** - * {@inheritdoc} - */ - public function configureOptions(OptionsResolver $resolver): void { - //Set defaults - $resolver->setDefaults(['captcha' => true, 'translation_domain' => RapsysBlogBundle::getAlias()]); - } - - /** - * {@inheritdoc} - */ - public function getName(): string { - return 'rapsysblog_contact'; - } -} -- 2.41.3