forked from leftypol/leftypol
ajax.js: do not send request if captcha does not have a response
This commit is contained in:
parent
ae6b9edf45
commit
222c4c4d27
1 changed files with 12 additions and 6 deletions
|
@ -19,6 +19,12 @@ $(window).ready(function() {
|
|||
// Enable submit button if disabled (cache problem)
|
||||
$('input[type="submit"]').removeAttr('disabled');
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
var setup_form = function($form) {
|
||||
$form.submit(function() {
|
||||
if (do_not_ajax)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue