Added auto logout option

This commit is contained in:
RainLoop Team 2015-02-18 23:52:52 +04:00
parent 76f319a07f
commit bb551e4ec8
18 changed files with 171 additions and 33 deletions

View file

@ -92,6 +92,10 @@
Globals.$html.removeClass('rl-ctrl-key-pressed'); Globals.$html.removeClass('rl-ctrl-key-pressed');
} }
}); });
Globals.$doc.on('mousemove keypress click', _.debounce(function () {
Events.pub('rl.auto-logout-refresh');
}, 5000));
} }
_.extend(AbstractApp.prototype, AbstractBoot.prototype); _.extend(AbstractApp.prototype, AbstractBoot.prototype);

View file

@ -1398,6 +1398,15 @@
}); });
}; };
AppUser.prototype.logout = function ()
{
var self = this;
Remote.logout(function () {
self.loginAndLogoutReload(true,
Settings.settingsGet('ParentEmail') && 0 < Settings.settingsGet('ParentEmail').length);
});
};
AppUser.prototype.bootstartLoginScreen = function () AppUser.prototype.bootstartLoginScreen = function ()
{ {
Globals.$html.removeClass('rl-user-auth').addClass('rl-user-no-auth'); Globals.$html.removeClass('rl-user-auth').addClass('rl-user-no-auth');
@ -1568,6 +1577,10 @@
Remote.appDelayStart(Utils.emptyFunction); Remote.appDelayStart(Utils.emptyFunction);
}, 35000); }, 35000);
Events.sub('rl.auto-logout', function () {
self.logout();
});
Plugins.runHook('rl-start-user-screens'); Plugins.runHook('rl-start-user-screens');
Events.pub('rl.bootstart-user-screens'); Events.pub('rl.bootstart-user-screens');

View file

@ -263,7 +263,8 @@
Enums.Layout = { Enums.Layout = {
'NoPreview': 0, 'NoPreview': 0,
'SidePreview': 1, 'SidePreview': 1,
'BottomPreview': 2 'BottomPreview': 2,
'Mobile': 3
}; };
/** /**

View file

@ -63,11 +63,8 @@
'SettingsFilters', 'SETTINGS_LABELS/LABEL_FILTERS_NAME', 'filters'); 'SettingsFilters', 'SETTINGS_LABELS/LABEL_FILTERS_NAME', 'filters');
} }
if (Settings.capa(Enums.Capa.TwoFactor)) kn.addSettingsViewModel(require('Settings/User/Security'),
{ 'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
kn.addSettingsViewModel(require('Settings/User/Security'),
'SettingsSecurity', 'SETTINGS_LABELS/LABEL_SECURITY_NAME', 'security');
}
if ((Settings.settingsGet('AllowGoogleSocial') && Settings.settingsGet('AllowGoogleSocialAuth')) || if ((Settings.settingsGet('AllowGoogleSocial') && Settings.settingsGet('AllowGoogleSocialAuth')) ||
Settings.settingsGet('AllowFacebookSocial') || Settings.settingsGet('AllowFacebookSocial') ||

View file

@ -11,6 +11,10 @@
Utils = require('Common/Utils'), Utils = require('Common/Utils'),
Translator = require('Common/Translator'), Translator = require('Common/Translator'),
SettinsStore = require('Stores/User/Settings'),
Settings = require('Storage/Settings'),
Remote = require('Storage/User/Remote') Remote = require('Storage/User/Remote')
; ;
@ -19,6 +23,22 @@
*/ */
function SecurityUserSettings() function SecurityUserSettings()
{ {
this.capaTwoFactor = Settings.capa(Enums.Capa.TwoFactor);
this.autoLogout = SettinsStore.autoLogout;
this.autoLogout.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
this.autoLogoutOptions = ko.computed(function () {
Translator.trigger();
return [
{'id': 0, 'name': Translator.i18n('SETTINGS_SECURITY/AUTOLOGIN_NEVER_OPTION_NAME')},
{'id': 5, 'name': Translator.i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {'MINUTES': 5})},
{'id': 10, 'name': Translator.i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {'MINUTES': 10})},
{'id': 30, 'name': Translator.i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {'MINUTES': 30})},
{'id': 60, 'name': Translator.i18n('SETTINGS_SECURITY/AUTOLOGIN_MINUTES_OPTION_NAME', {'MINUTES': 60})}
];
});
this.processing = ko.observable(false); this.processing = ko.observable(false);
this.clearing = ko.observable(false); this.clearing = ko.observable(false);
this.secreting = ko.observable(false); this.secreting = ko.observable(false);
@ -186,8 +206,27 @@
SecurityUserSettings.prototype.onBuild = function () SecurityUserSettings.prototype.onBuild = function ()
{ {
this.processing(true); if (this.capaTwoFactor)
Remote.getTwoFactor(this.onResult); {
this.processing(true);
Remote.getTwoFactor(this.onResult);
}
var self = this;
_.delay(function () {
var
f0 = Utils.settingsSaveHelperSimpleFunction(self.autoLogout.trigger, self)
;
self.autoLogout.subscribe(function (sValue) {
Remote.saveSettings(f0, {
'AutoLogout': Utils.pInt(sValue)
});
});
});
}; };
module.exports = SecurityUserSettings; module.exports = SecurityUserSettings;

View file

@ -24,6 +24,11 @@
this.accounts = ko.observableArray([]); this.accounts = ko.observableArray([]);
this.accounts.loading = ko.observable(false).extend({'throttle': 100}); this.accounts.loading = ko.observable(false).extend({'throttle': 100});
this.computers();
}
AccountUserStore.prototype.computers = function ()
{
this.accountsEmails = ko.computed(function () { this.accountsEmails = ko.computed(function () {
return _.compact(_.map(this.accounts(), function (oItem) { return _.compact(_.map(this.accounts(), function (oItem) {
return oItem ? oItem.email : null; return oItem ? oItem.email : null;
@ -44,7 +49,7 @@
return iResult; return iResult;
}, this); }, this);
} };
AccountUserStore.prototype.populate = function () AccountUserStore.prototype.populate = function ()
{ {

View file

@ -23,18 +23,18 @@
this.trashFolder = ko.observable(''); this.trashFolder = ko.observable('');
this.archiveFolder = ko.observable(''); this.archiveFolder = ko.observable('');
this.computed(); this.computers();
this.subscribe(); this.subscribers();
} }
FolderUserStore.prototype.computed = function () FolderUserStore.prototype.computers = function ()
{ {
this.draftFolderNotEnabled = ko.computed(function () { this.draftFolderNotEnabled = ko.computed(function () {
return '' === this.draftFolder() || Consts.Values.UnuseOptionValue === this.draftFolder(); return '' === this.draftFolder() || Consts.Values.UnuseOptionValue === this.draftFolder();
}, this); }, this);
}; };
FolderUserStore.prototype.subscribe = function () FolderUserStore.prototype.subscribers = function ()
{ {
var var
fRemoveSystemFolderType = function (observable) { fRemoveSystemFolderType = function (observable) {

View file

@ -126,12 +126,12 @@
}; };
} }
this.computedProperies(); this.computers();
this.initNotificationPlayer(); this.initNotificationPlayer();
} }
NotificationUserStore.prototype.computedProperies = function () NotificationUserStore.prototype.computers = function ()
{ {
this.isDesktopNotificationSupported = ko.computed(function () { this.isDesktopNotificationSupported = ko.computed(function () {
return Enums.DesktopNotification.NotSupported !== this.desktopNotificationPermissions(); return Enums.DesktopNotification.NotSupported !== this.desktopNotificationPermissions();

View file

@ -4,6 +4,7 @@
'use strict'; 'use strict';
var var
window = require('window'),
ko = require('ko'), ko = require('ko'),
Consts = require('Common/Consts'), Consts = require('Common/Consts'),
@ -20,6 +21,8 @@
*/ */
function SettingsUserStore() function SettingsUserStore()
{ {
this.iAutoLogoutTimer = 0;
this.layout = ko.observable(Enums.Layout.SidePreview) this.layout = ko.observable(Enums.Layout.SidePreview)
.extend({'limitedList': [ .extend({'limitedList': [
Enums.Layout.SidePreview, Enums.Layout.BottomPreview, Enums.Layout.NoPreview Enums.Layout.SidePreview, Enums.Layout.BottomPreview, Enums.Layout.NoPreview
@ -39,24 +42,27 @@
this.useThreads = ko.observable(false); this.useThreads = ko.observable(false);
this.replySameFolder = ko.observable(false); this.replySameFolder = ko.observable(false);
this.computedProperies(); this.autoLogout = ko.observable(30);
this.subscribes();
this.computers();
this.subscribers();
} }
SettingsUserStore.prototype.computedProperies = function () SettingsUserStore.prototype.computers = function ()
{ {
this.usePreviewPane = ko.computed(function () { this.usePreviewPane = ko.computed(function () {
return Enums.Layout.NoPreview !== this.layout(); return Enums.Layout.NoPreview !== this.layout();
}, this); }, this);
}; };
SettingsUserStore.prototype.subscribes = function () SettingsUserStore.prototype.subscribers = function ()
{ {
this.layout.subscribe(function (nValue) { this.layout.subscribe(function (nValue) {
Globals.$html.toggleClass('rl-no-preview-pane', Enums.Layout.NoPreview === nValue); Globals.$html.toggleClass('rl-no-preview-pane', Enums.Layout.NoPreview === nValue);
Globals.$html.toggleClass('rl-side-preview-pane', Enums.Layout.SidePreview === nValue); Globals.$html.toggleClass('rl-side-preview-pane', Enums.Layout.SidePreview === nValue);
Globals.$html.toggleClass('rl-bottom-preview-pane', Enums.Layout.BottomPreview === nValue); Globals.$html.toggleClass('rl-bottom-preview-pane', Enums.Layout.BottomPreview === nValue);
Globals.$html.toggleClass('rl-mobile-layout', Enums.Layout.Mobile === nValue);
Events.pub('layout', [nValue]); Events.pub('layout', [nValue]);
}); });
@ -67,12 +73,27 @@
this.layout(Utils.pInt(Settings.settingsGet('Layout'))); this.layout(Utils.pInt(Settings.settingsGet('Layout')));
this.editorDefaultType(Settings.settingsGet('EditorDefaultType')); this.editorDefaultType(Settings.settingsGet('EditorDefaultType'));
this.autoLogout(Utils.pInt(Settings.settingsGet('AutoLogout')));
this.messagesPerPage(Settings.settingsGet('MPP')); this.messagesPerPage(Settings.settingsGet('MPP'));
this.showImages(!!Settings.settingsGet('ShowImages')); this.showImages(!!Settings.settingsGet('ShowImages'));
this.useCheckboxesInList(!!Settings.settingsGet('UseCheckboxesInList')); this.useCheckboxesInList(!!Settings.settingsGet('UseCheckboxesInList'));
this.useThreads(!!Settings.settingsGet('UseThreads')); this.useThreads(!!Settings.settingsGet('UseThreads'));
this.replySameFolder(!!Settings.settingsGet('ReplySameFolder')); this.replySameFolder(!!Settings.settingsGet('ReplySameFolder'));
var self = this;
Events.sub('rl.auto-logout-refresh', function () {
window.clearTimeout(self.iAutoLogoutTimer);
if (0 < self.autoLogout())
{
self.iAutoLogoutTimer = window.setTimeout(function () {
Events.pub('rl.auto-logout');
}, self.autoLogout() * 1000 * 60);
}
});
Events.pub('rl.auto-logout-refresh');
}; };
module.exports = new SettingsUserStore(); module.exports = new SettingsUserStore();

View file

@ -21,6 +21,11 @@
this.templatesNames = ko.observableArray([]).extend({'throttle': 1000}); this.templatesNames = ko.observableArray([]).extend({'throttle': 1000});
this.templatesNames.skipFirst = true; this.templatesNames.skipFirst = true;
this.subscribers();
}
TemplateUserStore.prototype.subscribers = function ()
{
this.templates.subscribe(function (aList) { this.templates.subscribe(function (aList) {
this.templatesNames(_.compact(_.map(aList, function (oItem) { this.templatesNames(_.compact(_.map(aList, function (oItem) {
return oItem ? oItem.name : null; return oItem ? oItem.name : null;
@ -37,7 +42,7 @@
// Remote.templatesSortOrder(null, aList); // Remote.templatesSortOrder(null, aList);
// } // }
// }, this); // }, this);
} };
module.exports = new TemplateUserStore(); module.exports = new TemplateUserStore();

View file

@ -36,6 +36,11 @@
line-height: 22px; line-height: 22px;
} }
.identity-default {
cursor: pointer;
color: #ccc;
}
.identity-name { .identity-name {
display: inline-block; display: inline-block;
word-break: break-all; word-break: break-all;

View file

@ -1321,7 +1321,7 @@
return false; return false;
}); });
if (!!Settings.settingsGet('AllowСtrlEnterOnCompose')) if (!!Settings.settingsGet('AllowCtrlEnterOnCompose'))
{ {
key('ctrl+enter, command+enter', Enums.KeyState.Compose, function () { key('ctrl+enter, command+enter', Enums.KeyState.Compose, function () {
self.sendCommand(); self.sendCommand();

View file

@ -15,7 +15,6 @@
AccountStore = require('Stores/User/Account'), AccountStore = require('Stores/User/Account'),
Settings = require('Storage/Settings'), Settings = require('Storage/Settings'),
Remote = require('Storage/User/Remote'),
AbstractView = require('Knoin/AbstractView') AbstractView = require('Knoin/AbstractView')
; ;
@ -80,10 +79,7 @@
AbstractSystemDropDownUserView.prototype.logoutClick = function () AbstractSystemDropDownUserView.prototype.logoutClick = function ()
{ {
Remote.logout(function () { require('App/User').logout();
require('App/User').loginAndLogoutReload(true,
Settings.settingsGet('ParentEmail') && 0 < Settings.settingsGet('ParentEmail').length);
});
}; };
AbstractSystemDropDownUserView.prototype.onBuild = function () AbstractSystemDropDownUserView.prototype.onBuild = function ()

View file

@ -1269,7 +1269,7 @@ class Actions
'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true), 'AllowAdminPanel' => (bool) $oConfig->Get('security', 'allow_admin_panel', true),
'AllowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false), 'AllowHtmlEditorSourceButton' => (bool) $oConfig->Get('labs', 'allow_html_editor_source_button', false),
'AllowHtmlEditorBitiButtons' => (bool) $oConfig->Get('labs', 'allow_html_editor_biti_buttons', false), 'AllowHtmlEditorBitiButtons' => (bool) $oConfig->Get('labs', 'allow_html_editor_biti_buttons', false),
'AllowСtrlEnterOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false), 'AllowCtrlEnterOnCompose' => (bool) $oConfig->Get('labs', 'allow_ctrl_enter_on_compose', false),
'UseRsaEncryption' => (bool) $oConfig->Get('security', 'use_rsa_encryption', false), 'UseRsaEncryption' => (bool) $oConfig->Get('security', 'use_rsa_encryption', false),
'RsaPublicKey' => '', 'RsaPublicKey' => '',
'HideDangerousActions' => $oConfig->Get('labs', 'hide_dangerous_actions', false), 'HideDangerousActions' => $oConfig->Get('labs', 'hide_dangerous_actions', false),
@ -1546,10 +1546,10 @@ class Actions
$aResult['Layout'] = (int) $oConfig->Get('defaults', 'view_layout', \RainLoop\Enumerations\Layout::SIDE_PREVIEW); $aResult['Layout'] = (int) $oConfig->Get('defaults', 'view_layout', \RainLoop\Enumerations\Layout::SIDE_PREVIEW);
$aResult['EditorDefaultType'] = (string) $oConfig->Get('defaults', 'view_editor_type', ''); $aResult['EditorDefaultType'] = (string) $oConfig->Get('defaults', 'view_editor_type', '');
$aResult['UseCheckboxesInList'] = (bool) $oConfig->Get('defaults', 'view_use_checkboxes', true); $aResult['UseCheckboxesInList'] = (bool) $oConfig->Get('defaults', 'view_use_checkboxes', true);
$aResult['AutoLogout'] = (int) $oConfig->Get('defaults', 'autologout', 30);
$aResult['UseThreads'] = (bool) $oConfig->Get('defaults', 'mail_use_threads', false); $aResult['UseThreads'] = (bool) $oConfig->Get('defaults', 'mail_use_threads', false);
$aResult['ReplySameFolder'] = (bool) $oConfig->Get('defaults', 'mail_reply_same_folder', false); $aResult['ReplySameFolder'] = (bool) $oConfig->Get('defaults', 'mail_reply_same_folder', false);
$aResult['ContactsAutosave'] = (bool) $oConfig->Get('defaults', 'contacts_autosave', true); $aResult['ContactsAutosave'] = (bool) $oConfig->Get('defaults', 'contacts_autosave', true);
$aResult['Signature'] = '';
$aResult['EnableTwoFactor'] = false; $aResult['EnableTwoFactor'] = false;
$aResult['ParentEmail'] = ''; $aResult['ParentEmail'] = '';
$aResult['InterfaceAnimation'] = true; $aResult['InterfaceAnimation'] = true;
@ -1583,13 +1583,12 @@ class Actions
$aResult['SoundNotification'] = (bool) $oSettings->GetConf('SoundNotification', $aResult['SoundNotification']); $aResult['SoundNotification'] = (bool) $oSettings->GetConf('SoundNotification', $aResult['SoundNotification']);
$aResult['DesktopNotifications'] = (bool) $oSettings->GetConf('DesktopNotifications', $aResult['DesktopNotifications']); $aResult['DesktopNotifications'] = (bool) $oSettings->GetConf('DesktopNotifications', $aResult['DesktopNotifications']);
$aResult['UseCheckboxesInList'] = (bool) $oSettings->GetConf('UseCheckboxesInList', $aResult['UseCheckboxesInList']); $aResult['UseCheckboxesInList'] = (bool) $oSettings->GetConf('UseCheckboxesInList', $aResult['UseCheckboxesInList']);
$aResult['AutoLogout'] = (int) $oSettings->GetConf('AutoLogout', $aResult['AutoLogout']);
$aResult['Layout'] = (int) $oSettings->GetConf('Layout', $aResult['Layout']); $aResult['Layout'] = (int) $oSettings->GetConf('Layout', $aResult['Layout']);
$aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $aResult['UseThreads']); $aResult['UseThreads'] = (bool) $oSettingsLocal->GetConf('UseThreads', $aResult['UseThreads']);
$aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $aResult['ReplySameFolder']); $aResult['ReplySameFolder'] = (bool) $oSettingsLocal->GetConf('ReplySameFolder', $aResult['ReplySameFolder']);
$aResult['Signature'] = $oSettingsLocal->GetConf('Signature', $aResult['Signature']);
if ($this->GetCapa(false, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount)) if ($this->GetCapa(false, \RainLoop\Enumerations\Capa::USER_BACKGROUND, $oAccount))
{ {
$aResult['UserBackgroundName'] = (string) $oSettings->GetConf('UserBackgroundName', $aResult['UserBackgroundName']); $aResult['UserBackgroundName'] = (string) $oSettings->GetConf('UserBackgroundName', $aResult['UserBackgroundName']);
@ -4681,14 +4680,13 @@ class Actions
$this->setSettingsFromParams($oSettings, 'DesktopNotifications', 'bool'); $this->setSettingsFromParams($oSettings, 'DesktopNotifications', 'bool');
$this->setSettingsFromParams($oSettings, 'SoundNotification', 'bool'); $this->setSettingsFromParams($oSettings, 'SoundNotification', 'bool');
$this->setSettingsFromParams($oSettings, 'UseCheckboxesInList', 'bool'); $this->setSettingsFromParams($oSettings, 'UseCheckboxesInList', 'bool');
$this->setSettingsFromParams($oSettings, 'AutoLogout', 'int');
$this->setSettingsFromParams($oSettings, 'EnableTwoFactor', 'bool'); $this->setSettingsFromParams($oSettings, 'EnableTwoFactor', 'bool');
$this->setSettingsFromParams($oSettingsLocal, 'UseThreads', 'bool'); $this->setSettingsFromParams($oSettingsLocal, 'UseThreads', 'bool');
$this->setSettingsFromParams($oSettingsLocal, 'ReplySameFolder', 'bool'); $this->setSettingsFromParams($oSettingsLocal, 'ReplySameFolder', 'bool');
$this->setSettingsFromParams($oSettingsLocal, 'Signature', 'string');
return $this->DefaultResponse(__FUNCTION__, return $this->DefaultResponse(__FUNCTION__,
$this->SettingsProvider()->Save($oAccount, $oSettings) && $this->SettingsProvider()->Save($oAccount, $oSettings) &&
$this->SettingsProvider(true)->Save($oAccount, $oSettingsLocal)); $this->SettingsProvider(true)->Save($oAccount, $oSettingsLocal));

View file

@ -164,6 +164,7 @@ Values:
'view_editor_type' => array('Html', 'Editor mode used by default (Plain, Html, HtmlForced or PlainForced)'), 'view_editor_type' => array('Html', 'Editor mode used by default (Plain, Html, HtmlForced or PlainForced)'),
'view_layout' => array(1, 'layout: 0 - no preview, 1 - side preview, 3 - bottom preview'), 'view_layout' => array(1, 'layout: 0 - no preview, 1 - side preview, 3 - bottom preview'),
'view_use_checkboxes' => array(true), 'view_use_checkboxes' => array(true),
'autologout' => array(30),
'show_images' => array(false), 'show_images' => array(false),
'contacts_autosave' => array(true), 'contacts_autosave' => array(true),
'mail_use_threads' => array(false), 'mail_use_threads' => array(false),

View file

@ -1225,6 +1225,29 @@ class ServiceActions
return $bJsOutput ? 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml), $this->Logger()).';' : $sHtml; return $bJsOutput ? 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml), $this->Logger()).';' : $sHtml;
} }
/**
* @param string $sLanguage
*
* @return string
*/
private function convertLanguageNameToMomentLanguageName($sLanguage)
{
switch ($sLanguage)
{
case 'pt-pt':
$sLanguage = 'pt';
break;
case 'ja-jp':
$sLanguage = 'ja';
break;
case 'ko-kr':
$sLanguage = 'ko';
break;
}
return $sLanguage;
}
/** /**
* @param string $sLanguage * @param string $sLanguage
* @param bool $bWrapByScriptTag = true * @param bool $bWrapByScriptTag = true
@ -1236,7 +1259,9 @@ class ServiceActions
$aResultLang = array(); $aResultLang = array();
$sMoment = 'window.moment && window.moment.lang && window.moment.lang(\'en\');'; $sMoment = 'window.moment && window.moment.lang && window.moment.lang(\'en\');';
$sMomentFileName = APP_VERSION_ROOT_PATH.'app/i18n/moment/'.$sLanguage.'.js'; $sMomentFileName = APP_VERSION_ROOT_PATH.'app/i18n/moment/'.
$this->convertLanguageNameToMomentLanguageName($sLanguage).'.js';
if (\file_exists($sMomentFileName)) if (\file_exists($sMomentFileName))
{ {
$sMoment = \file_get_contents($sMomentFileName); $sMoment = \file_get_contents($sMomentFileName);

View file

@ -72,6 +72,10 @@
<i class="icon-braille drag-handle"></i> <i class="icon-braille drag-handle"></i>
&nbsp;&nbsp; &nbsp;&nbsp;
<span class="identity-name" data-bind="text: formattedName()"></span> <span class="identity-name" data-bind="text: formattedName()"></span>
&nbsp;&nbsp;
<span class="identity-default" data-bind="visible: 0 === $index()">
(<span class="i18n" data-i18n-text="SETTINGS_ACCOUNTS/DEFAULT_IDENTITY_LABEL"></span>)
</span>
</td> </td>
<td> <td>
<span data-bind="visible: !canBeDeleted()"></span> <span data-bind="visible: !canBeDeleted()"></span>

View file

@ -1,5 +1,29 @@
<div class="b-settings-security"> <div class="b-settings-security">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="legend">
<span class="i18n" data-i18n-text="SETTINGS_SECURITY/LEGEND_SECURITY"></span>
</div>
<div class="control-group">
<label class="control-label">
<span class="i18n" data-i18n-text="SETTINGS_SECURITY/LABEL_AUTOLOGOUT"></span>
</label>
<div class="controls">
<div data-bind="component: {
name: 'Select',
params: {
inline: true,
options: autoLogoutOptions,
value: autoLogout,
trigger: autoLogout.trigger,
optionsText: 'name',
optionsValue: 'id'
}
}"></div>
</div>
</div>
</div>
<br />
<div class="form-horizontal" data-bind="visible: capaTwoFactor">
<div class="legend"> <div class="legend">
<span class="i18n" data-i18n-text="SETTINGS_SECURITY/LEGEND_TWO_FACTOR_AUTH"></span> <span class="i18n" data-i18n-text="SETTINGS_SECURITY/LEGEND_TWO_FACTOR_AUTH"></span>
</div> </div>