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
10
js/ajax.js
10
js/ajax.js
|
@ -24,10 +24,12 @@ $(window).ready(function() {
|
|||
if (do_not_ajax)
|
||||
return true;
|
||||
|
||||
// In the captcha is present, halt if it does not have a response..
|
||||
if (captcha_renderer && postCaptchaId && !captcha_renderer.hasResponse(postCaptchaId)) {
|
||||
captcha_renderer.execute(postCaptchaId);
|
||||
return false;
|
||||
// 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)) {
|
||||
captcha_renderer.execute(postCaptchaId);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
var form = this;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue