Merge pull request #22815 from prastut/feature-enhance-loginflow

Trigger login if remember_login checked
This commit is contained in:
Thomas Müller 2016-03-07 14:46:08 +01:00
commit 67a58d663d
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);
});