controls/identity-edit-modal.ps1
function New-UDEditIdentityModal { param ( [Parameter(Mandatory = $true)] $Identity ) Show-UDModal -Content { New-UDPageHeader -Text ("Committing Changes to Identity: $($Identity.Name)") New-UDParagraph -Text "Specify values for the Identity" New-UDCard -Content { New-UDTextbox -Id "EditIdentityModalTextBoxName" -Label "Name" -Type text -Value $Identity.Name New-UDElement -Tag div -Attributes @{ style = @{ textAlign = "right" } } -Content { New-UDButton -Text "Confirm" -Icon check -OnClick { $IdentityName = ((Get-UDElement -Id 'EditIdentityModalTextBoxName').Attributes["value"]) Set-UAIdentity -Identity $Identity -Name $IdentityName Sync-UDElement -Id "identity-grid" -Broadcast Sync-UDElement -Id "role-grid" -Broadcast Hide-UDModal } } } } } |