fix some details

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2026-01-23 12:07:30 +01:00
parent 86dbb43532
commit 3e62ba0d27
6 changed files with 50 additions and 43 deletions

View file

@ -1,7 +1,9 @@
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
// Hide submit button initially // Hide submit button initially
const optionsFormSubmit = document.getElementById("options-form-submit"); const optionsFormSubmit = document.querySelectorAll(".options-form-submit");
optionsFormSubmit.style.display = 'none'; optionsFormSubmit.forEach(element => {
element.style.display = 'none';
});
const communityFormSubmit = document.getElementById("community-form-submit"); const communityFormSubmit = document.getElementById("community-form-submit");
communityFormSubmit.style.display = 'none'; communityFormSubmit.style.display = 'none';
@ -72,7 +74,9 @@ document.addEventListener("DOMContentLoaded", function () {
} }
// Show or hide submit button based on changes // Show or hide submit button based on changes
optionsFormSubmit.style.display = hasChanges ? 'block' : 'none'; optionsFormSubmit.forEach(element => {
element.style.display = hasChanges ? 'block' : 'none';
});
} }
// Function to compare current states to initial states // Function to compare current states to initial states

View file

@ -1,5 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) { document.addEventListener("DOMContentLoaded", function(event) {
// Collabora // Collabora
let collabora = document.getElementById("collabora"); const collabora = document.getElementById("office-collabora");
collabora.disabled = true; collabora.disabled = true;
}); });

View file

@ -1,7 +1,5 @@
document.addEventListener("DOMContentLoaded", function(event) { document.addEventListener("DOMContentLoaded", function(event) {
// OnlyOffice // OnlyOffice
let onlyoffice = document.getElementById("onlyoffice"); const onlyoffice = document.getElementById("office-onlyoffice");
if (onlyoffice) {
onlyoffice.disabled = true; onlyoffice.disabled = true;
}
}); });

View file

@ -27,7 +27,7 @@
<script type="text/javascript" src="timezone.js"></script> <script type="text/javascript" src="timezone.js"></script>
{# js for optional containers and additional containers forms #} {# js for optional containers and additional containers forms #}
<script type="text/javascript" src="containers-form-submit.js?v4"></script> <script type="text/javascript" src="containers-form-submit.js?v5"></script>
{% set hasBackupLocation = borg_backup_host_location or borg_remote_repo %} {% set hasBackupLocation = borg_backup_host_location or borg_remote_repo %}
{% set isAnyRunning = false %} {% set isAnyRunning = false %}

View file

@ -9,22 +9,10 @@
<input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}"> <input type="hidden" name="{{csrf.keys.name}}" value="{{csrf.name}}">
<input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}"> <input type="hidden" name="{{csrf.keys.value}}" value="{{csrf.value}}">
<input type="hidden" name="options-form" value="options-form"> <input type="hidden" name="options-form" value="options-form">
<p>
<input
type="checkbox"
id="clamav"
name="clamav"
{% if is_clamav_enabled == true %}
checked="checked"
data-initial-state="true"
{% else %}
data-initial-state="false"
{% endif %}
>
<label for="clamav">ClamAV (Antivirus backend for Nextcloud, needs ~1GB additional RAM)</label>
</p>
<h3>Office Suite</h3> <h3>Office Suite</h3>
{% if isAnyRunning == false %}
<p>Choose your preferred office suite. Only one can be enabled at a time.</p> <p>Choose your preferred office suite. Only one can be enabled at a time.</p>
{% endif %}
<div class="office-suite-cards"> <div class="office-suite-cards">
<input <input
type="radio" type="radio"
@ -94,6 +82,7 @@
</label> </label>
<input type="hidden" id="onlyoffice" name="onlyoffice" value="" data-initial-state="{% if is_onlyoffice_enabled == true %}true{% else %}false{% endif %}"> <input type="hidden" id="onlyoffice" name="onlyoffice" value="" data-initial-state="{% if is_onlyoffice_enabled == true %}true{% else %}false{% endif %}">
</div> </div>
{% if isAnyRunning == false %}
<div class="office-none-card"> <div class="office-none-card">
<input <input
type="radio" type="radio"
@ -112,7 +101,23 @@
Disable office suite Disable office suite
</label> </label>
</div> </div>
{% endif %}
<input class="options-form-submit" type="submit" value="Save changes" />
<h3>Additional Optional Containers</h3> <h3>Additional Optional Containers</h3>
<p>
<input
type="checkbox"
id="clamav"
name="clamav"
{% if is_clamav_enabled == true %}
checked="checked"
data-initial-state="true"
{% else %}
data-initial-state="false"
{% endif %}
>
<label for="clamav">ClamAV (Antivirus backend for Nextcloud, needs ~1GB additional RAM)</label>
</p>
<p> <p>
<input <input
type="checkbox" type="checkbox"
@ -203,15 +208,15 @@
> >
<label for="whiteboard">Whiteboard</label> <label for="whiteboard">Whiteboard</label>
</p> </p>
<input id="options-form-submit" type="submit" value="Save changes" /> <input class="options-form-submit" type="submit" value="Save changes" />
</form> </form>
<p><strong>Minimal system requirements:</strong> 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 <strong><a target="_blank" href="https://github.com/nextcloud/all-in-one/discussions/1335">this documentation</a></strong></p> <p><strong>Minimal system requirements:</strong> 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 <strong><a target="_blank" href="https://github.com/nextcloud/all-in-one/discussions/1335">this documentation</a></strong></p>
{% if isAnyRunning == true %} {% if isAnyRunning == true %}
<script type="text/javascript" src="disable-clamav.js"></script> <script type="text/javascript" src="disable-clamav.js"></script>
<script type="text/javascript" src="disable-docker-socket-proxy.js"></script> <script type="text/javascript" src="disable-docker-socket-proxy.js"></script>
<script type="text/javascript" src="disable-talk.js"></script> <script type="text/javascript" src="disable-talk.js"></script>
<script type="text/javascript" src="disable-collabora.js"></script> <script type="text/javascript" src="disable-collabora.js?v2"></script>
<script type="text/javascript" src="disable-onlyoffice.js"></script> <script type="text/javascript" src="disable-onlyoffice.js?v2"></script>
<script type="text/javascript" src="disable-imaginary.js"></script> <script type="text/javascript" src="disable-imaginary.js"></script>
<script type="text/javascript" src="disable-fulltextsearch.js"></script> <script type="text/javascript" src="disable-fulltextsearch.js"></script>
<script type="text/javascript" src="disable-talk-recording.js"></script> <script type="text/javascript" src="disable-talk-recording.js"></script>

View file

@ -33,7 +33,7 @@ test('Initial setup', async ({ page: setupPage }) => {
await containersPage.getByRole('checkbox', { name: 'Whiteboard' }).uncheck(); await containersPage.getByRole('checkbox', { name: 'Whiteboard' }).uncheck();
await containersPage.getByRole('checkbox', { name: 'Imaginary' }).uncheck(); await containersPage.getByRole('checkbox', { name: 'Imaginary' }).uncheck();
await containersPage.getByText('Disable office suite').click(); await containersPage.getByText('Disable office suite').click();
await containersPage.getByRole('button', { name: 'Save changes' }).click(); await containersPage.getByRole('button', { name: 'Save changes' }).last().click();
await expect(containersPage.locator('#talk')).not.toBeChecked() await expect(containersPage.locator('#talk')).not.toBeChecked()
await expect(containersPage.getByRole('checkbox', { name: 'Whiteboard' })).not.toBeChecked() await expect(containersPage.getByRole('checkbox', { name: 'Whiteboard' })).not.toBeChecked()
await expect(containersPage.getByRole('checkbox', { name: 'Imaginary' })).not.toBeChecked() await expect(containersPage.getByRole('checkbox', { name: 'Imaginary' })).not.toBeChecked()