This commit is contained in:
zuzanna-maria 2024-05-28 18:43:17 +01:00
parent f03a05cac0
commit b6dcb3fc47
2 changed files with 132 additions and 154 deletions

View File

@ -23,8 +23,7 @@ define([
) {
var AppConfigScreen = {}
var AppConfigScreen = {};
const blocks = Sidebar.blocks;
AppConfigScreen.titleConfig = function (sendAdminDecree) {
@ -81,7 +80,6 @@ define([
$button.attr('disabled', 'disabled');
let reader = new FileReader();
reader.onloadend = function () {
let dataURL = this.result;
sendAdminDecree('UPLOAD_LOGO', {dataURL}, function (e, response) {
$button.removeAttr('disabled');
@ -99,7 +97,6 @@ define([
UI.log(Messages.saved);
})
};
reader.readAsDataURL(files[0]);
});
@ -198,15 +195,8 @@ define([
setColor('', () => {});
});
// let form = blocks.form([
// labelCurrent,
// label
// ], blocks.nav([btn, remove, btn.spinner]));
var button = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
sendAdminDecree('SET_INSTANCE_NAME', [$input.val().trim()], function (e, response) {
if (e || response.error) {
UI.warn(Messages.error);
$input.val('');
@ -220,7 +210,6 @@ define([
})
sendAdminDecree('SET_INSTANCE_DESCRIPTION', [$description.val().trim()], function (e, response) {
if (e || response.error) {
UI.warn(Messages.error);
$input.val('');
@ -260,7 +249,6 @@ define([
}
AppConfigScreen.mfaRegistrationScreen = function(sendAdminDecree) {
var restrict = blocks.activeCheckbox({
key: 'registration',
getState: function () {
@ -268,7 +256,6 @@ define([
},
query: function (val, setState) {
sendAdminDecree('RESTRICT_REGISTRATION', [val], function (e, response) {
if (e || response.error) {
UI.warn(Messages.error);
$input.val('');
@ -290,9 +277,7 @@ define([
return false
},
query: function (val, setState) {
sendAdminDecree('ENFORCE_MFA', [val], function (e, response) {
if (e || response.error) {
UI.warn(Messages.error);
$input.val('');
@ -316,7 +301,6 @@ define([
var form = blocks.form([restrict, forceMFA], [button])
return form
}
@ -324,7 +308,6 @@ define([
const blocks = Sidebar.blocks;
const grid = blocks.block([], 'cp-admin-customize-apps-grid');
const allApps = ['pad', 'code', 'kanban', 'slide', 'sheet', 'form', 'whiteboard', 'diagram'];
const availableApps = []
@ -350,7 +333,6 @@ define([
var save = blocks.activeButton('primary', '', Messages.settings_save, function (done) {
sendAdminDecree('DISABLE_APPS', availableApps, function (e, response) {
if (e || response.error) {
UI.warn(Messages.error);
$input.val('');
@ -381,12 +363,10 @@ define([
append();
});
let form = blocks.form([
grid
], blocks.nav([save]));
return form
}

View File

@ -222,8 +222,6 @@ define([
showTitleScreen(sendAdminDecree)
// showAppScreen(sendAdminDecree)
});
};