auto posting fix
This commit is contained in:
parent
e33bec4cfe
commit
f5060431c2
@ -1257,7 +1257,7 @@
|
||||
return $.replace(oldFile, file);
|
||||
},
|
||||
autoPost: function() {
|
||||
if (qr.el && $('#auto', qr.el).checked && !qr.postInvalid()) {
|
||||
if (qr.el && $('#auto', qr.el).checked) {
|
||||
return qr.submit.call($('form', qr.el));
|
||||
}
|
||||
},
|
||||
@ -1435,7 +1435,9 @@
|
||||
submit: function(e) {
|
||||
var id, msg, op;
|
||||
if (msg = qr.postInvalid()) {
|
||||
e.preventDefault();
|
||||
if (typeof e.preventDefault === "function") {
|
||||
e.preventDefault();
|
||||
}
|
||||
alert(msg);
|
||||
if (msg === 'You forgot to type in the verification.') {
|
||||
$('#dummy', qr.el).focus();
|
||||
|
||||
@ -996,7 +996,7 @@ qr =
|
||||
$.replace oldFile, file
|
||||
|
||||
autoPost: ->
|
||||
if qr.el and $('#auto', qr.el).checked and not qr.postInvalid()
|
||||
if qr.el and $('#auto', qr.el).checked
|
||||
qr.submit.call $ 'form', qr.el
|
||||
|
||||
captchaNode: (e) ->
|
||||
@ -1173,8 +1173,9 @@ qr =
|
||||
$.replace oldFile, newFile
|
||||
|
||||
submit: (e) ->
|
||||
#XXX `e` won't exist if we're here from `qr.submit.call form`.
|
||||
if msg = qr.postInvalid()
|
||||
e.preventDefault()
|
||||
e.preventDefault?()
|
||||
alert msg
|
||||
if msg is 'You forgot to type in the verification.'
|
||||
$('#dummy', qr.el).focus()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user