This commit is contained in:
buddh4 2019-11-29 17:45:57 +01:00
parent 7a4507a391
commit 111abab8dd
2 changed files with 24 additions and 1 deletions

View File

@ -15,6 +15,7 @@ class UserAsset extends AssetBundle
public $sourcePath = '@user/resources';
public $css = [];
public $js = [
'js/humhub.user.js'
'js/humhub.user.js',
'js/humhub.user.login.js',
];
}

View File

@ -0,0 +1,22 @@
humhub.module('user.login', function(module, require, $) {
var init = function() {
$('body').on('click', '.authChoice .auth-link', function(e) {
var checked = $('#login-rememberme').is(':checked');
var $this = $(this);
var original = $this.data('originalUrl');
if(!original) {
original = $this.attr('href');
$this.data('originalUrl', original);
}
$this.attr('href', checked ? original + '&rememberme=1' : original);
});
};
module.export({
init: init
});
});