mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-23 00:06:08 +01:00
change metadata fix
This commit is contained in:
parent
58ad7a1e8a
commit
0ed021357b
@ -87,20 +87,18 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
const deleteAllCheckbox = document.querySelector("#deleteAll");
|
const deleteAllCheckbox = document.querySelector("#deleteAll");
|
||||||
const inputs = document.querySelectorAll(".form-control");
|
let inputs = document.querySelectorAll("input");
|
||||||
const customMetadataDiv = document.getElementById('customMetadata');
|
const customMetadataDiv = document.getElementById('customMetadata');
|
||||||
const otherMetadataEntriesDiv = document.getElementById('otherMetadataEntries');
|
const otherMetadataEntriesDiv = document.getElementById('otherMetadataEntries');
|
||||||
|
|
||||||
deleteAllCheckbox.addEventListener("change", function(event) {
|
deleteAllCheckbox.addEventListener("change", function(event) {
|
||||||
if (event.target !== deleteAllCheckbox) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs.forEach(input => {
|
inputs.forEach(input => {
|
||||||
if (input === deleteAllCheckbox) {
|
// If it's the deleteAllCheckbox or any file input, skip
|
||||||
return;
|
if (input === deleteAllCheckbox || input.type === "file") {
|
||||||
}
|
return;
|
||||||
input.disabled = deleteAllCheckbox.checked;
|
}
|
||||||
|
// Disable or enable based on the checkbox state
|
||||||
|
input.disabled = deleteAllCheckbox.checked;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user