From: Raphaƫl Gertz Date: Tue, 14 Oct 2025 10:35:10 +0000 (+0200) Subject: Enable captcha by default X-Git-Tag: 0.0.1~22 X-Git-Url: https://git.rapsys.eu/blogbundle/commitdiff_plain/5f9441875a2b38202d528bb9b0fd5e047e51c999?ds=inline Enable captcha by default Rename form --- 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'; } }