reset file input

This commit is contained in:
James Campos 2011-03-17 22:26:43 -07:00
parent 075f390690
commit 5a6f8cedc5
2 changed files with 6 additions and 1 deletions

View File

@ -522,7 +522,7 @@
}
};
iframeLoad = function() {
var auto, error, qr, span, submit, _ref, _ref2;
var auto, error, f, qr, span, submit, _ref, _ref2;
if (g.iframe = !g.iframe) {
return;
}
@ -540,6 +540,8 @@
} else if (g.REPLY && getConfig('Persistent QR')) {
$('textarea', qr).value = '';
$('input[name=recaptcha_response_field]', qr).value = '';
f = $('input[type=file]', qr).parentNode;
f.innerHTML = f.innerHTML;
submit = $('input[type=submit]', qr);
submit.value = g.sage ? 60 : 30;
submit.disabled = true;

View File

@ -364,6 +364,9 @@ iframeLoad = ->
else if g.REPLY and getConfig 'Persistent QR'
$('textarea', qr).value = ''
$('input[name=recaptcha_response_field]', qr).value = ''
# XXX file.value = '' doesn't work in opera
f = $('input[type=file]', qr).parentNode
f.innerHTML = f.innerHTML
submit = $ 'input[type=submit]', qr
submit.value = if g.sage then 60 else 30
submit.disabled = true