Fix duplicate checkbox ID issue causing cross-selection between clients
All checks were successful
Build and Push Docker Image / build (push) Successful in 26s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 48s
CI / Security audit (push) Successful in 1m21s
CI / Tests & coverage (push) Successful in 1m26s

This commit is contained in:
2026-05-19 23:51:57 +01:00
parent 747a14ebd3
commit 544c168b82

View File

@@ -1140,16 +1140,17 @@ function updateDownloadClientFilter() {
}
// Add checkboxes for each download client
downloadClients.forEach(client => {
downloadClients.forEach((client, index) => {
const option = document.createElement('div');
option.className = 'download-client-option';
const checkboxId = `download-client-checkbox-${index}`;
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.className = 'download-client-checkbox';
checkbox.value = client.id;
checkbox.checked = selectedDownloadClients.includes(client.id);
checkbox.id = `client-${client.id}`;
checkbox.id = checkboxId;
// Toggle selection when checkbox changes
checkbox.addEventListener('change', (e) => {
@@ -1158,7 +1159,7 @@ function updateDownloadClientFilter() {
const label = document.createElement('label');
label.className = 'download-client-option-label';
label.htmlFor = `client-${client.id}`;
label.htmlFor = checkboxId;
label.textContent = client.name;
const typeBadge = document.createElement('span');