[WIP] New GoogleReCAPTCHA code

Support for v3
v2-invisible doesn't work yet
This commit is contained in:
slawkens
2020-10-15 19:55:12 +02:00
parent 881a28138a
commit 1a36aa8904
9 changed files with 178 additions and 25 deletions

View File

@@ -496,8 +496,10 @@ function template_header($is_admin = false)
</noscript>
';
if($config['recaptcha_enabled'])
$ret .= "<script src='https://www.google.com/recaptcha/api.js'></script>";
if(config('recaptcha_enabled')) {
$ret .= '<script src="https://www.google.com/recaptcha/api.js' . (config('recaptcha_type') === 'v2-checkbox' ? '' : '?render=' . config('recaptcha_site_key')) . '"></script>';
}
return $ret;
}