controls/variable-edit-modal.ps1
function New-UDEditVariableModal { param ( [Parameter(Mandatory = $true)] $Variable ) Show-UDModal -Content { New-UDPageHeader -Text ("Committing Changes to Variable: $($Variable.Id)") New-UDParagraph -Text "Specify a new value for the variable" New-UDInput -Endpoint { param( [String] $Value = $ExistingValue ) $Value = if ($Value -eq "null") { "" } else { $Value } Set-UAVariable -Variable $Variable -Value $Value Sync-UDElement -Id "VariablesGrid" -Broadcast Hide-UDModal } } } |