controls/powershell-version-delete-modal.ps1
function New-UDDeletePowerShellVersionModal { param ( [Parameter(Mandatory = $true)] $PowerShellVersion ) Show-UDModal -Content { New-UDPageHeader -Text ("Deleting PowerShell Version") New-UDParagraph -Text "Are you sure you wish to remove PowerShell Version $($PowerShellVersion.Version) from Universal Automation?" New-UDParagraph -Text "Scripts will not longer be able to use this version of PowerShell." New-UDElement -Tag div -Attributes @{ style = @{ textAlign = "right" } } -Content { New-UDButton -Text "Confirm" -Icon check -OnClick { Remove-UAPowerShellVersion -PowerShellVersion $PowerShellVersion Sync-UDElement -Id "PowerShellVersionsGrid" -Broadcast Hide-UDModal } } } } |