]> Raphaël G. Git Repositories - blogbundle/commitdiff
Enable captcha by default
authorRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 10:35:10 +0000 (12:35 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 10:35:10 +0000 (12:35 +0200)
Rename form

Form/ContactType.php

index f727b44416465396871f08b00252f934a9035271..6f9faebe1d0a9485087d1014fd424033a0deea2c 100644 (file)
@@ -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';
        }
 }