handling multiple instances of reCaptcha

This commit is contained in:
Amine Ben hammou
2017-12-27 14:59:28 +00:00
parent a8052c118a
commit c63b7d9b91
4 changed files with 36 additions and 15 deletions

View File

@@ -48,7 +48,10 @@ class Renderer {
foreach($blocks as $key => $block) {
if($block['type'] == 'submit' && Setting::getValue('re_captcha.enabled')) {
$site_key = Setting::getValue('re_captcha.site_token');
$html .= '<div class="g-recaptcha" data-size="compact" data-sitekey="'. $site_key .'"></div>';
$html .= '<div class="mailpoet_recaptcha" data-sitekey="'. $site_key .'">
<div class="mailpoet_recaptcha_container"></div>
<input class="mailpoet_recaptcha_field" type="hidden" name="recaptcha">
</div>';
}
$html .= static::renderBlock($block) . PHP_EOL;
}