2013-07-08 12:13:21 -04:00
|
|
|
|
(function ($, document, window) {
|
|
|
|
|
|
|
|
|
|
function loadPage(page, config) {
|
|
|
|
|
|
2014-04-24 22:00:19 -04:00
|
|
|
|
$('#chkMobileClients', page).checked(config.RequireManualLoginForMobileApps).checkboxradio("refresh");
|
|
|
|
|
$('#chkOtherApps', page).checked(config.RequireManualLoginForOtherApps).checkboxradio("refresh");
|
2013-07-08 12:13:21 -04:00
|
|
|
|
|
|
|
|
|
Dashboard.hideLoadingMsg();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(document).on('pageshow', "#allUserSettingsPage", function () {
|
|
|
|
|
|
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
|
|
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
ApiClient.getServerConfiguration().done(function (config) {
|
|
|
|
|
|
|
|
|
|
loadPage(page, config);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function allUserSettingsPage() {
|
|
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
|
|
|
|
|
|
self.onSubmit = function () {
|
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
|
|
|
|
|
|
var form = this;
|
|
|
|
|
|
|
|
|
|
ApiClient.getServerConfiguration().done(function (config) {
|
|
|
|
|
|
2014-04-24 22:00:19 -04:00
|
|
|
|
config.RequireManualLoginForMobileApps = $('#chkMobileClients', form).checked();
|
|
|
|
|
config.RequireManualLoginForOtherApps = $('#chkOtherApps', form).checked();
|
2013-07-08 12:13:21 -04:00
|
|
|
|
|
|
|
|
|
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Disable default form submission
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
window.AllUserSettingsPage = new allUserSettingsPage();
|
|
|
|
|
|
|
|
|
|
})(jQuery, document, window);
|