allow to disable/enable talk-recording

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-06-05 15:05:14 +02:00
parent 07faad0ab2
commit 70f27ae304
12 changed files with 113 additions and 4 deletions

View file

@ -0,0 +1,4 @@
document.addEventListener("DOMContentLoaded", function(event) {
// Talk-recording
document.getElementById("talk-recording").disabled = true;
});

View file

@ -120,6 +120,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
'nextcloud_max_time' => $configurationManager->GetNextcloudMaxTime(),
'nextcloud_memory_limit' => $configurationManager->GetNextcloudMemoryLimit(),
'is_dri_device_enabled' => $configurationManager->isDriDeviceEnabled(),
'is_talk_recording_enabled' => $configurationManager->isTalkRecordingEnabled(),
]);
})->setName('profile');
$app->get('/login', function (Request $request, Response $response, array $args) use ($container) {

View file

@ -3,6 +3,16 @@ function makeOptionsFormSubmitVisible() {
optionsFormSubmit.style.display = 'block';
}
function handleTalkVisibility(talk) {
let talkRecording = document.getElementById("talk-recording")
if (talk.checked) {
talkRecording.disabled = false
} else {
talkRecording.checked = false
talkRecording.disabled = true
}
}
document.addEventListener("DOMContentLoaded", function(event) {
// handle submit button for options form
var optionsFormSubmit = document.getElementById("options-form-submit");
@ -25,6 +35,14 @@ document.addEventListener("DOMContentLoaded", function(event) {
// Talk
var talk = document.getElementById("talk");
talk.addEventListener('change', makeOptionsFormSubmitVisible);
talk.addEventListener('change', handleTalkVisibility);
// Talk-recording
var talkRecording = document.getElementById("talk-recording");
talkRecording.addEventListener('change', makeOptionsFormSubmitVisible);
if (!talk.checked) {
talkRecording.disabled = true
}
// Imaginary
var imaginary = document.getElementById("imaginary");