diff --git a/php/public/containers-form-submit.js b/php/public/containers-form-submit.js index 1382bced..abd3fc68 100644 --- a/php/public/containers-form-submit.js +++ b/php/public/containers-form-submit.js @@ -1,9 +1,7 @@ document.addEventListener("DOMContentLoaded", function () { // Hide submit button initially - const optionsFormSubmit = document.querySelectorAll(".options-form-submit"); - optionsFormSubmit.forEach(element => { - element.style.display = 'none'; - }); + const optionsFormSubmit = document.getElementById("options-form-submit"); + optionsFormSubmit.style.display = 'none'; const communityFormSubmit = document.getElementById("community-form-submit"); communityFormSubmit.style.display = 'none'; @@ -74,9 +72,7 @@ document.addEventListener("DOMContentLoaded", function () { } // Show or hide submit button based on changes - optionsFormSubmit.forEach(element => { - element.style.display = hasChanges ? 'block' : 'none'; - }); + optionsFormSubmit.style.display = hasChanges ? 'block' : 'none'; } // Function to compare current states to initial states diff --git a/php/public/disable-collabora.js b/php/public/disable-collabora.js index 762252ce..3064ef51 100644 --- a/php/public/disable-collabora.js +++ b/php/public/disable-collabora.js @@ -1,5 +1,5 @@ document.addEventListener("DOMContentLoaded", function(event) { // Collabora - const collabora = document.getElementById("office-collabora"); + let collabora = document.getElementById("collabora"); collabora.disabled = true; }); \ No newline at end of file diff --git a/php/public/disable-onlyoffice.js b/php/public/disable-onlyoffice.js index c660bd9d..83482339 100644 --- a/php/public/disable-onlyoffice.js +++ b/php/public/disable-onlyoffice.js @@ -1,5 +1,7 @@ document.addEventListener("DOMContentLoaded", function(event) { // OnlyOffice - const onlyoffice = document.getElementById("office-onlyoffice"); - onlyoffice.disabled = true; + let onlyoffice = document.getElementById("onlyoffice"); + if (onlyoffice) { + onlyoffice.disabled = true; + } }); \ No newline at end of file diff --git a/php/public/style.css b/php/public/style.css index 57e973d9..bdc31a4c 100644 --- a/php/public/style.css +++ b/php/public/style.css @@ -37,9 +37,9 @@ --main-padding: 50px; } -/* Breakpoint calculation: 580px (max-width) + 100px (main-padding * 2) + 200px (additional space) = 880px +/* Breakpoint calculation: 800px (max-width) + 100px (main-padding * 2) + 200px (additional space) = 1100px Note: Unfortunately, it's not possible to calculate this dynamically using CSS variables in media queries */ -@media only screen and (max-width: 880px) { +@media only screen and (max-width: 1100px) { :root { --container-top-margin: 50px; --container-bottom-margin: 0px; diff --git a/php/templates/containers.twig b/php/templates/containers.twig index 8e437bc2..2f722768 100644 --- a/php/templates/containers.twig +++ b/php/templates/containers.twig @@ -27,7 +27,7 @@ {# js for optional containers and additional containers forms #} - + {% set hasBackupLocation = borg_backup_host_location or borg_remote_repo %} {% set isAnyRunning = false %} diff --git a/php/templates/includes/optional-containers.twig b/php/templates/includes/optional-containers.twig index 883dc278..f3739b04 100644 --- a/php/templates/includes/optional-containers.twig +++ b/php/templates/includes/optional-containers.twig @@ -9,10 +9,22 @@ +

+ + +

Office Suite

- {% if isAnyRunning == false %} -

Choose your preferred office suite. Only one can be enabled at a time.

- {% endif %} +

Choose your preferred office suite. Only one can be enabled at a time.

- {% if isAnyRunning == false %} -
- - -
- {% endif %} - -

Additional Optional Containers

-

+

- -

+ +
+

Additional Optional Containers

- +

Minimal system requirements: When any optional container is enabled, at least 2GB RAM, a dual-core CPU and 40GB system storage are required. When enabling ClamAV, Nextcloud Talk Recording-server or Fulltextsearch, at least 3GB RAM are required. For Talk Recording-server additional 2 vCPUs are required. When enabling everything, at least 5GB RAM and a quad-core CPU are required. Recommended are at least 1GB more RAM than the minimal requirement. For further advice and recommendations see this documentation

{% if isAnyRunning == true %} - - + + diff --git a/php/tests/tests/initial-setup.spec.js b/php/tests/tests/initial-setup.spec.js index 1f21f011..c455e725 100644 --- a/php/tests/tests/initial-setup.spec.js +++ b/php/tests/tests/initial-setup.spec.js @@ -33,7 +33,7 @@ test('Initial setup', async ({ page: setupPage }) => { await containersPage.getByRole('checkbox', { name: 'Whiteboard' }).uncheck(); await containersPage.getByRole('checkbox', { name: 'Imaginary' }).uncheck(); await containersPage.getByText('Disable office suite').click(); - await containersPage.getByRole('button', { name: 'Save changes' }).last().click(); + await containersPage.getByRole('button', { name: 'Save changes' }).click(); await expect(containersPage.locator('#talk')).not.toBeChecked() await expect(containersPage.getByRole('checkbox', { name: 'Whiteboard' })).not.toBeChecked() await expect(containersPage.getByRole('checkbox', { name: 'Imaginary' })).not.toBeChecked()