2022-03-16 06:46:58 +08:00
function makeOptionsFormSubmitVisible ( ) {
2023-06-06 17:27:52 +08:00
let optionsFormSubmit = document . getElementById ( "options-form-submit" ) ;
2022-03-16 06:46:58 +08:00
optionsFormSubmit . style . display = 'block' ;
}
2023-06-06 17:27:52 +08:00
function handleTalkVisibility ( ) {
let talk = document . getElementById ( "talk" ) ;
2023-06-05 21:05:14 +08:00
let talkRecording = document . getElementById ( "talk-recording" )
if ( talk . checked ) {
talkRecording . disabled = false
} else {
talkRecording . checked = false
talkRecording . disabled = true
}
}
2023-08-24 20:09:21 +08:00
function handleDockerSocketProxyWarning ( ) {
let dockerSocketProxy = document . getElementById ( "docker-socket-proxy" ) ;
if ( dockerSocketProxy . checked ) {
alert ( '⚠️ Warning! Enabling this container comes with possible Security problems since you are exposing the docker socket and all its privileges to the Nextcloud container. Enable this only if you are sure what you are doing!' )
}
}
2022-03-16 06:46:58 +08:00
document . addEventListener ( "DOMContentLoaded" , function ( event ) {
// handle submit button for options form
2023-06-06 17:27:52 +08:00
let optionsFormSubmit = document . getElementById ( "options-form-submit" ) ;
2022-03-16 06:46:58 +08:00
optionsFormSubmit . style . display = 'none' ;
// Clamav
2023-06-06 17:27:52 +08:00
let clamav = document . getElementById ( "clamav" ) ;
2022-03-16 06:46:58 +08:00
clamav . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
2022-03-17 17:13:21 +08:00
// OnlyOffice
2023-06-06 17:27:52 +08:00
let onlyoffice = document . getElementById ( "onlyoffice" ) ;
2022-12-16 17:36:13 +08:00
if ( onlyoffice ) {
2022-08-23 04:36:34 +08:00
onlyoffice . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
}
2022-03-17 17:13:21 +08:00
// Collabora
2023-06-06 17:27:52 +08:00
let collabora = document . getElementById ( "collabora" ) ;
2022-03-17 17:13:21 +08:00
collabora . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
// Talk
2023-06-06 17:27:52 +08:00
let talk = document . getElementById ( "talk" ) ;
2022-03-17 17:13:21 +08:00
talk . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
2023-06-05 21:05:14 +08:00
talk . addEventListener ( 'change' , handleTalkVisibility ) ;
// Talk-recording
2023-06-06 17:27:52 +08:00
let talkRecording = document . getElementById ( "talk-recording" ) ;
2023-06-05 21:05:14 +08:00
talkRecording . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
if ( ! talk . checked ) {
talkRecording . disabled = true
}
2022-08-17 21:09:22 +08:00
// Imaginary
2023-06-06 17:27:52 +08:00
let imaginary = document . getElementById ( "imaginary" ) ;
2022-08-17 21:09:22 +08:00
imaginary . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
2022-08-22 19:04:44 +08:00
// Fulltextsearch
2023-06-06 17:27:52 +08:00
let fulltextsearch = document . getElementById ( "fulltextsearch" ) ;
2022-08-22 19:04:44 +08:00
fulltextsearch . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
2023-08-24 20:09:21 +08:00
// Docker socket proxy
let dockerSocketProxy = document . getElementById ( "docker-socket-proxy" ) ;
2023-08-30 18:42:57 +08:00
if ( dockerSocketProxy ) {
dockerSocketProxy . addEventListener ( 'change' , makeOptionsFormSubmitVisible ) ;
2023-08-30 22:34:40 +08:00
// dockerSocketProxy.addEventListener('change', handleDockerSocketProxyWarning);
2023-08-30 18:42:57 +08:00
}
2022-03-16 06:46:58 +08:00
} ) ;