feat(captcha): Added Text Captcha provider

This commit is contained in:
Roman Kelesidis 2025-03-08 19:38:36 +03:00
commit ec6b47cddf
2 changed files with 4 additions and 1 deletions

View file

@ -3073,6 +3073,7 @@ $lang['UPLOAD_ERRORS'] = [
$lang['CAPTCHA'] = 'Check that you are not a robot';
$lang['CAPTCHA_WRONG'] = 'You could not confirm that you are not a robot';
$lang['CAPTCHA_SETTINGS'] = '<h2>Captcha is not fully configured</h2><p>Generate the keys using the dashboard of your captcha service, after you need to put them at the file library/config.php.</p>';
$lang['CAPTCHA_OCCURS_BACKGROUND'] = 'The CAPTCHA verification occurs in the background';
// Sending email
$lang['REPLY_TO'] = 'Reply to';

View file

@ -41,7 +41,9 @@ class GoogleCaptchaV3 implements CaptchaInterface
*/
public function get(): string
{
return "
global $lang;
return "{$lang['CAPTCHA_OCCURS_BACKGROUND']}
<script src='https://www.google.com/recaptcha/api.js?render={$this->settings['public_key']}&lang={$this->settings['language']}'></script>
<script>
grecaptcha.ready(function() {