forked from leftypol/leftypol
ajax.js: trigger the captcha only if present and needed
This commit is contained in:
parent
262e8971bd
commit
91f53552c9
1 changed files with 6 additions and 4 deletions
|
@ -24,11 +24,13 @@ $(window).ready(function() {
|
||||||
if (do_not_ajax)
|
if (do_not_ajax)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// In the captcha is present, halt if it does not have a response..
|
// If the captcha is present, halt if it does not have a response.
|
||||||
|
if (captchaMode === 'static' || (captchaMode === 'dynamic' && isDynamicCaptchaEnabled())) {
|
||||||
if (captcha_renderer && postCaptchaId && !captcha_renderer.hasResponse(postCaptchaId)) {
|
if (captcha_renderer && postCaptchaId && !captcha_renderer.hasResponse(postCaptchaId)) {
|
||||||
captcha_renderer.execute(postCaptchaId);
|
captcha_renderer.execute(postCaptchaId);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var form = this;
|
var form = this;
|
||||||
var submit_txt = $(this).find('input[type="submit"]').val();
|
var submit_txt = $(this).find('input[type="submit"]').val();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue