mirror of
https://github.com/nextcloud/server.git
synced 2024-08-25 06:08:18 +02:00
![John Molakvoæ (skjnldsv)](/assets/img/avatar_default.png)
Fixed transition bug of grouptop Fix password submit and error handling Fixed multiple form send Fix submit loading state fix login form sending state Replace loader type Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
42 lines
1001 B
JavaScript
42 lines
1001 B
JavaScript
/**
|
|
* Copyright (c) 2015
|
|
* Vincent Petry <pvince81@owncloud.com>
|
|
* Jan-Christoph Borchardt, http://jancborchardt.net
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
* See the COPYING-README file.
|
|
*/
|
|
|
|
/**
|
|
* @namespace
|
|
* @memberOf OC
|
|
*/
|
|
OC.Login = _.extend(OC.Login || {}, {
|
|
onLogin: function () {
|
|
// Only if password reset form is not active
|
|
if($('form[name=login][action]').length === 0) {
|
|
$('#submit-wrapper .submit-icon')
|
|
.removeClass('icon-confirm-white')
|
|
.addClass('icon-loading-small-dark');
|
|
$('#submit')
|
|
.attr('value', t('core', 'Logging in …'));
|
|
$('.login-additional').fadeOut();
|
|
return true;
|
|
}
|
|
return false;
|
|
},
|
|
|
|
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);
|
|
});
|