qr.autoPost
This commit is contained in:
parent
3a577acf86
commit
17c594e19a
@ -1220,9 +1220,7 @@
|
|||||||
submit.disabled = false;
|
submit.disabled = false;
|
||||||
submit.value = 'Submit';
|
submit.value = 'Submit';
|
||||||
}
|
}
|
||||||
if (qr.el && $('#auto', qr.el).checked && !qr.postInvalid()) {
|
return qr.autoPost();
|
||||||
return qr.submit.call($('form', qr.el));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -1258,6 +1256,11 @@
|
|||||||
oldFile = $('#qr_form input[type=file]', qr.el);
|
oldFile = $('#qr_form input[type=file]', qr.el);
|
||||||
return $.replace(oldFile, file);
|
return $.replace(oldFile, file);
|
||||||
},
|
},
|
||||||
|
autoPost: function() {
|
||||||
|
if (qr.el && $('#auto', qr.el).checked && !qr.postInvalid()) {
|
||||||
|
return qr.submit.call($('form', qr.el));
|
||||||
|
}
|
||||||
|
},
|
||||||
captchaNode: function(e) {
|
captchaNode: function(e) {
|
||||||
var target;
|
var target;
|
||||||
if (!qr.el) {
|
if (!qr.el) {
|
||||||
|
|||||||
@ -960,8 +960,7 @@ cooldown =
|
|||||||
for submit in submits
|
for submit in submits
|
||||||
submit.disabled = false
|
submit.disabled = false
|
||||||
submit.value = 'Submit'
|
submit.value = 'Submit'
|
||||||
if qr.el and $('#auto', qr.el).checked and not qr.postInvalid()
|
qr.autoPost()
|
||||||
qr.submit.call $ 'form', qr.el
|
|
||||||
|
|
||||||
qr =
|
qr =
|
||||||
# TODO
|
# TODO
|
||||||
@ -995,6 +994,10 @@ qr =
|
|||||||
oldFile = $ '#qr_form input[type=file]', qr.el
|
oldFile = $ '#qr_form input[type=file]', qr.el
|
||||||
$.replace oldFile, file
|
$.replace oldFile, file
|
||||||
|
|
||||||
|
autoPost: ->
|
||||||
|
if qr.el and $('#auto', qr.el).checked and not qr.postInvalid()
|
||||||
|
qr.submit.call $ 'form', qr.el
|
||||||
|
|
||||||
captchaNode: (e) ->
|
captchaNode: (e) ->
|
||||||
return unless qr.el
|
return unless qr.el
|
||||||
{target} = e
|
{target} = e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user