don't store blank captchas

This commit is contained in:
James Campos 2011-08-10 10:07:58 -07:00
parent 947e367c7e
commit de9d2f1129
2 changed files with 2 additions and 2 deletions

View File

@ -1264,7 +1264,7 @@
},
captchaKeydown: function(e) {
var blank;
if (e.keyCode !== 13) {
if (!(e.keyCode === 13 && this.value)) {
return;
}
blank = !$('textarea', qr.el).value && !$('input[type=file]', qr.el).files.length;

View File

@ -997,7 +997,7 @@ qr =
$('#recaptcha_challenge_field', qr.el).value = target.value
captchaKeydown: (e) ->
return unless e.keyCode is 13 #enter
return unless e.keyCode is 13 and @value #enter
blank = !$('textarea', qr.el).value and !$('input[type=file]', qr.el).files.length
return unless blank or cooldown.duration