minor UI fix
This commit is contained in:
@@ -13,8 +13,8 @@ function ( // eslint-disable-line func-names
|
|||||||
var sitekey = $(this).attr('data-sitekey');
|
var sitekey = $(this).attr('data-sitekey');
|
||||||
var container = $(this).find('> .mailpoet_recaptcha_container').get(0);
|
var container = $(this).find('> .mailpoet_recaptcha_container').get(0);
|
||||||
var field = $(this).find('> .mailpoet_recaptcha_field');
|
var field = $(this).find('> .mailpoet_recaptcha_field');
|
||||||
var widget_id = window.grecaptcha.render(container, {sitekey: sitekey, size: 'compact'});
|
var widgetId = window.grecaptcha.render(container, { sitekey: sitekey, size: 'compact' });
|
||||||
field.val(widget_id);
|
field.val(widgetId);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -110,7 +110,8 @@ class Widget extends \WP_Widget {
|
|||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if(!empty(Setting::getValue('re_captcha')) && Setting::getValue('re_captcha.enabled')) {
|
$captcha = Setting::getValue('re_captcha');
|
||||||
|
if(!empty($captcha['enabled'])) {
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'mailpoet_recaptcha',
|
'mailpoet_recaptcha',
|
||||||
'https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit',
|
'https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit',
|
||||||
|
@@ -72,6 +72,8 @@
|
|||||||
$('#settings_re_captcha_tokens_error').show();
|
$('#settings_re_captcha_tokens_error').show();
|
||||||
window.location.href = '#advanced';
|
window.location.href = '#advanced';
|
||||||
return false;
|
return false;
|
||||||
|
} else {
|
||||||
|
$('#settings_re_captcha_tokens_error').hide();
|
||||||
}
|
}
|
||||||
// if we're setting up a sending method, try to activate it
|
// if we're setting up a sending method, try to activate it
|
||||||
if ($('.mailpoet_mta_setup_save').is(':visible')) {
|
if ($('.mailpoet_mta_setup_save').is(':visible')) {
|
||||||
|
Reference in New Issue
Block a user