mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 20:24:51 +08:00
4cc2207513
Original unminified source code (dev folder - js, css, less) (fixes #6) Grunt build system Multiple identities correction (fixes #9) Compose html editor (fixes #12) New general settings - Loading Description New warning about default admin password Split general and login screen settings
53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
|
|
|
|
/**
|
|
* @constructor
|
|
*/
|
|
function AdminLogin()
|
|
{
|
|
var oData = RL.data();
|
|
|
|
this.allowCustomLogin = oData.allowCustomLogin;
|
|
this.determineUserLanguage = oData.determineUserLanguage;
|
|
|
|
this.defaultDomain = ko.observable(RL.settingsGet('LoginDefaultDomain'));
|
|
|
|
this.allowLanguagesOnLogin = oData.allowLanguagesOnLogin;
|
|
this.defaultDomainTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
|
}
|
|
|
|
Utils.addSettingsViewModel(AdminLogin, 'AdminSettingsLogin', 'Login', 'login');
|
|
|
|
AdminLogin.prototype.onBuild = function ()
|
|
{
|
|
var self = this;
|
|
_.delay(function () {
|
|
|
|
var f1 = Utils.settingsSaveHelperSimpleFunction(self.defaultDomainTrigger, self);
|
|
|
|
self.determineUserLanguage.subscribe(function (bValue) {
|
|
RL.remote().saveAdminConfig(null, {
|
|
'DetermineUserLanguage': bValue ? '1' : '0'
|
|
});
|
|
});
|
|
|
|
self.allowCustomLogin.subscribe(function (bValue) {
|
|
RL.remote().saveAdminConfig(null, {
|
|
'AllowCustomLogin': bValue ? '1' : '0'
|
|
});
|
|
});
|
|
|
|
self.allowLanguagesOnLogin.subscribe(function (bValue) {
|
|
RL.remote().saveAdminConfig(null, {
|
|
'AllowLanguagesOnLogin': bValue ? '1' : '0'
|
|
});
|
|
});
|
|
|
|
self.defaultDomain.subscribe(function (sValue) {
|
|
RL.remote().saveAdminConfig(f1, {
|
|
'LoginDefaultDomain': Utils.trim(sValue)
|
|
});
|
|
});
|
|
|
|
}, 50);
|
|
};
|