check dummy if nothing cached
This commit is contained in:
parent
3022c02e51
commit
e33bec4cfe
@ -1323,7 +1323,6 @@
|
|||||||
},
|
},
|
||||||
message: function(e) {
|
message: function(e) {
|
||||||
var data, duration, fileCount;
|
var data, duration, fileCount;
|
||||||
Recaptcha.reload();
|
|
||||||
$('iframe[name=iframe]').src = 'about:blank';
|
$('iframe[name=iframe]').src = 'about:blank';
|
||||||
fileCount = $('#files', qr.el).childElementCount;
|
fileCount = $('#files', qr.el).childElementCount;
|
||||||
data = e.data;
|
data = e.data;
|
||||||
@ -1363,7 +1362,7 @@
|
|||||||
return $.bind(quote, 'click', qr.quote);
|
return $.bind(quote, 'click', qr.quote);
|
||||||
},
|
},
|
||||||
postInvalid: function() {
|
postInvalid: function() {
|
||||||
var captcha, captchas, content, cutoff;
|
var captcha, captchas, content, cutoff, dummy, response;
|
||||||
content = $('textarea', qr.el).value || $('input[type=file]', qr.el).files.length;
|
content = $('textarea', qr.el).value || $('input[type=file]', qr.el).files.length;
|
||||||
if (!content) {
|
if (!content) {
|
||||||
return 'Error: No text entered.';
|
return 'Error: No text entered.';
|
||||||
@ -1382,7 +1381,16 @@
|
|||||||
$.set('captchas', captchas);
|
$.set('captchas', captchas);
|
||||||
$('#captchas', qr.el).textContent = captchas.length + ' captchas';
|
$('#captchas', qr.el).textContent = captchas.length + ' captchas';
|
||||||
if (!captcha) {
|
if (!captcha) {
|
||||||
return 'You forgot to type in the verification.';
|
dummy = $('#dummy', qr.el);
|
||||||
|
if (!(response = dummy.value)) {
|
||||||
|
return 'You forgot to type in the verification';
|
||||||
|
}
|
||||||
|
captcha = {
|
||||||
|
challenge: qr.challenge,
|
||||||
|
response: response
|
||||||
|
};
|
||||||
|
dummy.value = '';
|
||||||
|
Recaptcha.reload();
|
||||||
}
|
}
|
||||||
$('#recaptcha_challenge_field', qr.el).value = captcha.challenge;
|
$('#recaptcha_challenge_field', qr.el).value = captcha.challenge;
|
||||||
$('#recaptcha_response_field', qr.el).value = captcha.response;
|
$('#recaptcha_response_field', qr.el).value = captcha.response;
|
||||||
|
|||||||
@ -1076,7 +1076,6 @@ qr =
|
|||||||
$.append d.body, qr.el
|
$.append d.body, qr.el
|
||||||
|
|
||||||
message: (e) ->
|
message: (e) ->
|
||||||
Recaptcha.reload()
|
|
||||||
$('iframe[name=iframe]').src = 'about:blank'
|
$('iframe[name=iframe]').src = 'about:blank'
|
||||||
fileCount = $('#files', qr.el).childElementCount
|
fileCount = $('#files', qr.el).childElementCount
|
||||||
|
|
||||||
@ -1128,7 +1127,14 @@ qr =
|
|||||||
|
|
||||||
$('#captchas', qr.el).textContent = captchas.length + ' captchas'
|
$('#captchas', qr.el).textContent = captchas.length + ' captchas'
|
||||||
|
|
||||||
return 'You forgot to type in the verification.' unless captcha
|
unless captcha
|
||||||
|
dummy = $ '#dummy', qr.el
|
||||||
|
return 'You forgot to type in the verification' unless response = dummy.value
|
||||||
|
captcha =
|
||||||
|
challenge: qr.challenge
|
||||||
|
response: response
|
||||||
|
dummy.value = ''
|
||||||
|
Recaptcha.reload()
|
||||||
|
|
||||||
$('#recaptcha_challenge_field', qr.el).value = captcha.challenge
|
$('#recaptcha_challenge_field', qr.el).value = captcha.challenge
|
||||||
$('#recaptcha_response_field', qr.el).value = captcha.response
|
$('#recaptcha_response_field', qr.el).value = captcha.response
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user