showing the recaptcha

This commit is contained in:
Amine Ben hammou
2017-12-18 18:27:36 +00:00
parent 7202d9dca1
commit a05f9bf97b
2 changed files with 7 additions and 2 deletions

View File

@@ -36,7 +36,12 @@ function ( // eslint-disable-line func-names
// non ajax post request // non ajax post request
return true; return true;
} }
// ajax request
if (formData['g-recaptcha-response']) {
formData.data.recaptcha = formData['g-recaptcha-response'];
}
// ajax request
MailPoet.Ajax.post({ MailPoet.Ajax.post({
url: window.MailPoetForm.ajax_url, url: window.MailPoetForm.ajax_url,
token: formData.token, token: formData.token,

View File

@@ -22,4 +22,4 @@
var MailPoetForm = <%= json_encode(mailpoet_form) %>; var MailPoetForm = <%= json_encode(mailpoet_form) %>;
</script> </script>
</body> </body>
</html> </html>