From a833308193353daa34ad54667a6c6471f17e028b Mon Sep 17 00:00:00 2001 From: Lord-Grey Date: Sat, 23 Dec 2023 16:19:47 +0100 Subject: [PATCH] Do not show lock config, if in non-UI mode --- assets/webconfig/js/content_events.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/assets/webconfig/js/content_events.js b/assets/webconfig/js/content_events.js index 7f7201e2..787b9289 100644 --- a/assets/webconfig/js/content_events.js +++ b/assets/webconfig/js/content_events.js @@ -1,6 +1,7 @@ $(document).ready(function () { performTranslation(); + let isGuiMode = window.sysInfo.hyperion.isGuiMode; const CEC_ENABLED = (jQuery.inArray("cec", window.serverInfo.services) !== -1); let conf_editor_osEvents = null; @@ -76,6 +77,12 @@ $(document).ready(function () { osEvents: window.schema.osEvents }, true, true); + conf_editor_osEvents.on('ready', function () { + if (!isGuiMode) { + showInputOptionsForKey(conf_editor_osEvents, "osEvents", "suspendEnable", false); + } + }); + conf_editor_osEvents.on('change', function () { conf_editor_osEvents.validate().length || window.readOnlyMode ? $('#btn_submit_os_events').prop('disabled', true) : $('#btn_submit_os_events').prop('disabled', false); });