Fix status returned to banned user.

This commit is contained in:
Vladimir Golovnev (Glassez)
2014-11-03 16:22:25 +03:00
parent 6f14b34470
commit 651bf4f9aa
2 changed files with 22 additions and 12 deletions

View File

@@ -20,8 +20,15 @@
url: '/login',
method: 'post',
data: $('loginform').toQueryString(),
onFailure: function() {
alert("_(Unable to log in, qBittorrent is probably unreachable.)");
onComplete: function() {
$('password').set('value', '');
},
onFailure: function(xhr) {
if (xhr.responseText != "") {
$('error_msg').set('html', xhr.responseText);
} else {
$('error_msg').set('html', '_(Unable to log in, qBittorrent is probably unreachable.)');
}
},
onSuccess: function(text) {
if (text == "Ok.") {