From 5f9441875a2b38202d528bb9b0fd5e047e51c999 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Tue, 14 Oct 2025 12:35:10 +0200 Subject: [PATCH] Enable captcha by default Rename form --- Form/ContactType.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Form/ContactType.php b/Form/ContactType.php index f727b44..6f9faeb 100644 --- a/Form/ContactType.php +++ b/Form/ContactType.php @@ -20,8 +20,13 @@ 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} @@ -44,13 +49,13 @@ class ContactType extends CaptchaType { */ public function configureOptions(OptionsResolver $resolver): void { //Set defaults - $resolver->setDefaults(['error_bubbling' => true]); + $resolver->setDefaults(['captcha' => true, 'translation_domain' => RapsysBlogBundle::getAlias()]); } /** * {@inheritdoc} */ - public function getName() { - return 'contact_form'; + public function getName(): string { + return 'rapsysblog_contact'; } } -- 2.41.3