Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New-UDInput remains checked after reload #129

Closed
adamdriscoll opened this issue May 1, 2018 · 0 comments
Closed

New-UDInput remains checked after reload #129

adamdriscoll opened this issue May 1, 2018 · 0 comments
Labels
bug Something isn't working materialize Highlight materialize issues
Milestone

Comments

@adamdriscoll
Copy link
Member

$page1 = New-UDPage -Name "Main" -Content {
New-UDInput -Title "MyTitle" -Endpoint {
param(
$userInput,
$inputType,
$UPNBox
)
    if ($inputType -eq 'login')
        {
        foreach ($value in $userInput)
            {
            try
                {
                $user = Get-ADUser -Identity $value -Server 'MyServer'
                }
            catch
                { 
                New-UDInputAction -Toast "Error" -Duration 1000
                }
            }
        if ($UPNBox) 
            {
            New-UDInputAction -Toast "Thanks" -Duration 500
            }
        }

        } -Content {
        New-UDInputField -Name 'inputType' -Type 'select'
        -Values @(
        "Login",
        "Username",
        "ComputerName")
        New-UDInputField -Name 'userInput' -Type 'textarea'
        New-UDInputField -Name 'SamAccountNameBox' -Type 'checkbox' -Placeholder 'SamAccountName'
        New-UDInputField -Name 'UPNBox' -Type 'checkbox' -Placeholder 'UPN'
    }
}

When $UPNBox is checked, the page will display the toast 'thanks', then the page will reload and the checkbox will appear unchecked
but if you click on submit again, the toast notification will be displayed again, even though $UPNBox 'should' be reset to false / unchecked

@adamdriscoll adamdriscoll added the bug Something isn't working label May 1, 2018
@adamdriscoll adamdriscoll modified the milestone: 1.6.2 May 26, 2018
@adamdriscoll adamdriscoll added the materialize Highlight materialize issues label May 16, 2019
@adamdriscoll adamdriscoll added this to the 2.4 milestone May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working materialize Highlight materialize issues
Projects
None yet
Development

No branches or pull requests

1 participant