diff --git a/TGBeta.ps1 b/TGBeta.ps1 index b8cac65..dba4308 100644 --- a/TGBeta.ps1 +++ b/TGBeta.ps1 @@ -697,9 +697,7 @@ function GetHtmlContent { function triggerInstall() { - const dropdown = document.getElementById('dattoRmmDropdown'); - const UID = dropdown.options[dropdown.selectedIndex].value; - const Name = dropdown.options[dropdown.selectedIndex].text; + const installSVSMSPModule = document.querySelector('input[name="installSVSMSPModule"]'); if (installSVSMSPModule.checked) { @@ -710,6 +708,11 @@ function GetHtmlContent { const installDattoRMM = document.querySelector('input[name="installDattoRMM"]'); if (installDattoRMM.checked) { + + const dropdown = document.getElementById('dattoRmmDropdown'); + const UID = dropdown.options[dropdown.selectedIndex].value; + const Name = dropdown.options[dropdown.selectedIndex].text; + const DattoRMMCheckbox = document.querySelectorAll('input[name="dattoRMMOption"]:checked'); appendLog("Installing selected site RMM...", "cyan");