adds check all checkbox
This commit is contained in:
7
app/static/common.js
Normal file
7
app/static/common.js
Normal file
@@ -0,0 +1,7 @@
|
||||
function checkAllCheckboxes(tableId, checkAllCheckboxId) {
|
||||
const table = document.getElementById(tableId);
|
||||
const checkboxes = table.querySelectorAll('input[type="checkbox"]');
|
||||
const checkAllCheckbox = document.getElementById(checkAllCheckboxId);
|
||||
|
||||
checkboxes.forEach(checkbox => checkbox.checked = checkAllCheckbox.checked);
|
||||
}
|
||||
Reference in New Issue
Block a user