mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Fix #1930 add option to autodetect dark mode in reCAPTCHA
This commit is contained in:
parent
8d89f256e6
commit
ec18bf34bd
5 changed files with 10 additions and 3 deletions
|
|
@ -34,6 +34,7 @@
|
|||
<label class="x_control-label" for="captcha_theme">{$lang->recaptcha_theme}</label>
|
||||
<div class="x_controls">
|
||||
<select id="captcha_theme" name="captcha_theme">
|
||||
<option value="auto" selected="selected"|cond="$config->captcha->theme === 'auto'">{$lang->recaptcha_theme_auto}</option>
|
||||
<option value="light" selected="selected"|cond="$config->captcha->theme === 'light'">{$lang->recaptcha_theme_light}</option>
|
||||
<option value="dark" selected="selected"|cond="$config->captcha->theme === 'dark'">{$lang->recaptcha_theme_dark}</option>
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -47,10 +47,14 @@ function reCaptchaCallback() {
|
|||
|
||||
recaptcha_instances.each(function() {
|
||||
var instance = $(this);
|
||||
var theme = recaptcha_config.data("theme");
|
||||
if (theme === 'auto') {
|
||||
theme = getColorScheme();
|
||||
}
|
||||
grecaptcha.render(instance.attr("id"), {
|
||||
sitekey: recaptcha_config.data("sitekey"),
|
||||
size: recaptcha_config.data("size"),
|
||||
theme: recaptcha_config.data("theme")
|
||||
theme: theme
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue