Ver código fonte

Formulaire de contact : nouveau Captcha

develop
Guillaume Bourgeois 1 semana atrás
pai
commit
a5b7daf6c1
1 arquivos alterados com 11 adições e 7 exclusões
  1. +11
    -7
      Form/Ticket/TicketFormType.php

+ 11
- 7
Form/Ticket/TicketFormType.php Ver arquivo

@@ -26,6 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Validator\Constraints\File;
use Lc\SovBundle\Form\Ticket\TicketFormType as SovTicketFormType;
use VictorPrdh\RecaptchaBundle\Form\ReCaptchaType;

class TicketFormType extends SovTicketFormType
{
@@ -95,13 +96,6 @@ class TicketFormType extends SovTicketFormType
'label' => 'Email'
]
);

$builder->add('captcha', Recaptcha3Type::class, [
'constraints' => new Recaptcha3(),
'action_name' => 'contact',
//'script_nonce_csp' => $nonceCSP,
'locale' => 'fr',
]);
}

$builder->add(
@@ -191,6 +185,16 @@ class TicketFormType extends SovTicketFormType
],
]
);

if(!$isConnected) {
/*$builder->add('captcha', Recaptcha3Type::class, [
'constraints' => new Recaptcha3(),
'action_name' => 'contact',
//'script_nonce_csp' => $nonceCSP,
'locale' => 'fr',
]);*/
$builder->add("recaptcha", ReCaptchaType::class);
}
}

/**

Carregando…
Cancelar
Salvar