trigger login if remember_login checked

This commit is contained in:
prastut 2016-03-04 00:22:04 +05:30
parent 8d2238e055
commit aa8bdc7f14
1 changed files with 11 additions and 0 deletions

View File

@ -17,8 +17,19 @@ OC.Login = _.extend(OC.Login || {}, {
.addClass('icon-loading-small')
.css('opacity', '1');
return true;
},
rememberLogin: function(){
if($(this).is(":checked")){
if($("#user").val() && $("#password").val()) {
$('#submit').trigger('click');
}
}
}
});
$(document).ready(function() {
$('form[name=login]').submit(OC.Login.onLogin);
$('#remember_login').click(OC.Login.rememberLogin);
});