mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Rename class for Turnstile config
This commit is contained in:
parent
1d3c5bc5d4
commit
9812228cbc
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ class Turnstile
|
|||
self::$scripts_added = true;
|
||||
Context::loadFile(array('./modules/spamfilter/tpl/js/turnstile.js', 'body'));
|
||||
Context::addHtmlFooter('<script src="https://challenges.cloudflare.com/turnstile/v0/api.js?compat=recaptcha&render=explicit&onload=turnstileCallback" async defer></script>');
|
||||
$html = '<div id="recaptcha-config" data-sitekey="%s" data-theme="%s" data-size="%s" data-targets="%s"></div>';
|
||||
$html = '<div id="turnstile-config" data-sitekey="%s" data-theme="%s" data-size="%s" data-targets="%s"></div>';
|
||||
$html = sprintf($html, escape(self::$config->site_key), self::$config->theme ?: 'auto', self::$config->size ?: 'normal', implode(',', array_keys($this->_target_actions)));
|
||||
Context::addHtmlFooter($html);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
function turnstileCallback() {
|
||||
var recaptcha_config = $("#recaptcha-config");
|
||||
var recaptcha_config = $("#turnstile-config");
|
||||
var recaptcha_instances = $(".turnstile-captcha");
|
||||
var recaptcha_instance_id = 1;
|
||||
var recaptcha_targets = String(recaptcha_config.data("targets")).split(",");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue