Update samy.js
This commit is contained in:
7
samy.js
7
samy.js
@@ -471,12 +471,13 @@ async function triggerInstall() {
|
||||
try {
|
||||
// Figure out which standard tasks are checked
|
||||
const checkedTasks = tasks.filter((t) => {
|
||||
if (["installDattoRMM", "installSVSMSPModule", "renameComputer"].includes(t.id)) return false;
|
||||
const cb = document.getElementById(t.id);
|
||||
return cb && cb.checked;
|
||||
});
|
||||
|
||||
// Rename checkbox / textbox
|
||||
const renameCB = document.getElementById("chkRenameComputer");
|
||||
const renameCB = document.getElementById("RenameComputer");
|
||||
const newNameInput = document.getElementById("txtNewComputerName");
|
||||
|
||||
// Count how many "extra" tasks (rename) we're doing
|
||||
@@ -529,7 +530,7 @@ async function triggerInstall() {
|
||||
|
||||
// 3. Remaining tasks
|
||||
for (const t of tasks) {
|
||||
if (["installDattoRMM", "installSVSMSPModule"].includes(t.id)) continue;
|
||||
if (["installDattoRMM", "installSVSMSPModule", "renameComputer"].includes(t.id)) continue;
|
||||
|
||||
const cb = document.getElementById(t.id);
|
||||
if (!cb || !cb.checked) continue;
|
||||
@@ -632,7 +633,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
});
|
||||
|
||||
// NEW: Rename computer checkbox -> show/hide text box
|
||||
const renameCheckbox = document.getElementById("chkRenameComputer");
|
||||
const renameCheckbox = document.getElementById("renameComputer");
|
||||
const renameBlock = document.getElementById("renameComputerBlock");
|
||||
|
||||
if (renameCheckbox && renameBlock) {
|
||||
|
||||
Reference in New Issue
Block a user