瀏覽代碼

Formulaire de contact : nouveau Captcha

develop
Guillaume Bourgeois 1 周之前
父節點
當前提交
a5b7daf6c1
共有 1 個文件被更改,包括 11 次插入7 次删除
  1. +11
    -7
      Form/Ticket/TicketFormType.php

+ 11
- 7
Form/Ticket/TicketFormType.php 查看文件

@@ -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);
}
}

/**

Loading…
取消
儲存