Fix duplicate checkbox ID issue causing cross-selection between clients
All checks were successful
All checks were successful
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user