don-safe2

This commit is contained in:
2025-11-24 16:09:49 -05:00
parent 2fa3b44682
commit 8af371bdc6

View File

@@ -1140,30 +1140,38 @@ document.addEventListener('DOMContentLoaded', () => {
container.querySelectorAll('input[type="checkbox"]').forEach(cb => cb.checked = master.checked); container.querySelectorAll('input[type="checkbox"]').forEach(cb => cb.checked = master.checked);
} }
document.addEventListener('DOMContentLoaded', () => { document.addEventListener('DOMContentLoaded', () => {
const master = document.getElementById('installDattoRMM'); // Hook up the main DattoRMM checkbox → show/hide its sub-options/password/dropdown
if (master) master.addEventListener('change', toggleDattoRMMOptions); const master = document.getElementById('installDattoRMM');
if (master) {
// Fetch sites when the "Enter" key is pressed in the password input field master.addEventListener('change', toggleDattoRMMOptions);
const passwordField = document.getElementById('Password'); }
const goButton = document.querySelector("button[onclick='fetchSites()']");
// Fetch sites when the "Enter" key is pressed in the password input field
const passwordField = document.getElementById('Password');
const goButton = document.querySelector("button[onclick='fetchSites()']");
if (passwordField && goButton) {
passwordField.addEventListener('keydown', (e) => { passwordField.addEventListener('keydown', (e) => {
if (e.key === 'Enter') { // Check if the key pressed is 'Enter' if (e.key === 'Enter') {
goButton.click(); // Trigger the 'Go' button click goButton.click(); // Trigger the 'Go' button click
} }
}); });
}
// Trigger 'Run Selected' button click when 'Enter' is pressed after selecting a site // Trigger 'Run Selected' button click when 'Enter' is pressed after selecting a site
const siteDropdown = document.getElementById('dattoDropdown'); const siteDropdown = document.getElementById('dattoDropdown');
const runButton = document.querySelector('.run-button'); const runButton = document.querySelector('.run-button');
siteDropdown.addEventListener('keydown', (e) => { if (siteDropdown && runButton) {
if (e.key === 'Enter' && siteDropdown.value) { // Check if the key pressed is 'Enter' and a site is selected siteDropdown.addEventListener('keydown', (e) => {
runButton.click(); // Trigger the 'Run Selected' button click if (e.key === 'Enter' && siteDropdown.value) {
} runButton.click(); // Trigger the 'Run Selected' button click
}
}); });
}); }
});
// ======================================================================= // =======================================================================