<!DOCTYPE html>
<html lang="en">
<head><head>
    <link href="https://d18k7b2git647n.cloudfront.net/20240614193835/css/bootstrap.min.css" rel="stylesheet"
        media="screen" />
    <link href="https://d18k7b2git647n.cloudfront.net/20240614193835/css/cognito-login.css" rel="stylesheet"
        media="screen" />
    
    <title>Signin</title>

    <script src="https://d18k7b2git647n.cloudfront.net/20240614193835/js/amazon-cognito-advanced-security-data.min.js" ></script>
    <script>
    function getAdvancedSecurityData(formReference) {
        if (typeof AmazonCognitoAdvancedSecurityData === "undefined") {
            return true;
        }

        // UserpoolId is not available on frontend for springboard. We do not use userPoolId
        // anyway other than put in context data. 
        var userPoolId = "";
        var clientId = getUrlParameter("client_id");

        var username = "";
        var usernameInput = document.getElementsByName("username")[0];
        if (usernameInput && usernameInput.value) {
            username = usernameInput.value;
        }

        var asfData = AmazonCognitoAdvancedSecurityData.getData(username, userPoolId, clientId);
        if (typeof asfData === "undefined") {
            return true;
        }

        if (formReference && formReference.cognitoAsfData) {
            formReference.cognitoAsfData.value = asfData
        }

        return true;
    }

    function getUrlParameter(name) {
        name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
        var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
        var results = regex.exec(location.search);
        return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
    }

    function onSubmit(evt, formRef) {
        formRef.querySelector('button[type="submit"]').disabled = true;
        if (!!formRef.submitted) {
            evt.preventDefault();
            return false;
        } else {
            formRef.submitted = true;
            return getAdvancedSecurityData(formRef);
        }
    }

    function onSubmitLoginForm (formRef) {
        formRef.querySelector('input[name="signInSubmitButton"]').disabled = true;
        getAdvancedSecurityData(formRef)
    }
</script>

    <meta name="viewport" content="width=device-width, initial-scale=1">
</head></head>
<body spellcheck="false">
    <div class="container">
        <div class="modal-dialog">
            <div class="modal-content background-customizable modal-content-mobile visible-xs visible-sm">
                <div><div>
                    <div class="banner-customizable">
                        <center>
                            
                        </center>
                    </div>
                </div></div>
                <div class="modal-body">
                    <div><div>
    
</div></div>
                    <div>
                        <div><div>
    
</div></div>
                        <div><div>
    
</div></div>
                        <div>
                            
                            <div><div>
    
        <Span class="textDescription-customizable ">Sign in with your username and password</Span>
        <form action="/login?client_id=7b04sudriogdk5gesenmrsri52&amp;redirect_uri=https%3A%2F%2Fuat.firstworldwar.tki.educationweb.services%2Foauth2%2Fidpresponse&amp;response_type=code&amp;scope=openid&amp;state=UHBlxoCopYu5b2s7Mc9E9noqpZAXYLxmQRuHSL%2B6V3xV7vyZ%2Fw5vwr8UxDpxD5l%2BwaItjukMx1KW3yHSKdiwmDE1fvQnJfv12MCFVjli%2FCyIxOTuj30YEo6zTZZi5TnpW2RGxrJMjtT8rTjQ3O9aacrvwBGtBY0UbrNYbw735Cm9DhdGfXOloBYmhKtIlIGo3V%2BC1V8gEQbxxDVqUI6nakIoUq5MX4NpanNlyB0X4wyAkBqwZH6MLfelRPQQkC4d" method="POST" name="cognitoSignInForm"
              class="cognito-asf" onsubmit="onSubmitLoginForm(this);"><input type="hidden" name="_csrf" value="800a50a5-5932-4f0e-99bb-befdcaad4bfe"/>

            

            
            <label for="signInFormUsername" class="label-customizable">Username</label>
            <div>
                
                
                <input id="signInFormUsername" name="username" type="text" class="form-control inputField-customizable"
                       placeholder="Username" autocapitalize="none" required value="">
            </div>

            <label for="signInFormPassword" class="label-customizable">Password</label>
            <div><input id="signInFormPassword" name="password" type="password" class="form-control inputField-customizable"
                   placeholder="Password"
                   required></div>
            <input type="hidden" class="form-control inputField-customizable" name="cognitoAsfData"/>
            
            <input name="signInSubmitButton" type="Submit" value="Sign in"
                   class="btn btn-primary submitButton-customizable" aria-label="submit"/>
            <br/>
            
        </form>
    
</div></div>
                        </div>
                    </div>
                </div>
            </div>

            

            <div class="modal-content background-customizable modal-content-mobile visible-md visible-lg">
                <div><div>
                    <div class="banner-customizable">
                        <center>
                            
                        </center>
                    </div>
                </div></div>
                <div class="modal-body">
                    <div><div>
    
</div></div>
                    <div>
                        <div>
                            <div><div>
    
</div></div>
                            <div><div>
    
</div></div>
                        </div>
                        <div>
                            <div><div>
    
        <Span class="textDescription-customizable ">Sign in with your username and password</Span>
        <form action="/login?client_id=7b04sudriogdk5gesenmrsri52&amp;redirect_uri=https%3A%2F%2Fuat.firstworldwar.tki.educationweb.services%2Foauth2%2Fidpresponse&amp;response_type=code&amp;scope=openid&amp;state=UHBlxoCopYu5b2s7Mc9E9noqpZAXYLxmQRuHSL%2B6V3xV7vyZ%2Fw5vwr8UxDpxD5l%2BwaItjukMx1KW3yHSKdiwmDE1fvQnJfv12MCFVjli%2FCyIxOTuj30YEo6zTZZi5TnpW2RGxrJMjtT8rTjQ3O9aacrvwBGtBY0UbrNYbw735Cm9DhdGfXOloBYmhKtIlIGo3V%2BC1V8gEQbxxDVqUI6nakIoUq5MX4NpanNlyB0X4wyAkBqwZH6MLfelRPQQkC4d" method="POST" name="cognitoSignInForm"
              class="cognito-asf" onsubmit="onSubmitLoginForm(this);"><input type="hidden" name="_csrf" value="800a50a5-5932-4f0e-99bb-befdcaad4bfe"/>

            

            
            <label for="signInFormUsername" class="label-customizable">Username</label>
            <div>
                
                
                <input id="signInFormUsername" name="username" type="text" class="form-control inputField-customizable"
                       placeholder="Username" autocapitalize="none" required value="">
            </div>

            <label for="signInFormPassword" class="label-customizable">Password</label>
            <div><input id="signInFormPassword" name="password" type="password" class="form-control inputField-customizable"
                   placeholder="Password"
                   required></div>
            <input type="hidden" class="form-control inputField-customizable" name="cognitoAsfData"/>
            
            <input name="signInSubmitButton" type="Submit" value="Sign in"
                   class="btn btn-primary submitButton-customizable" aria-label="submit"/>
            <br/>
            
        </form>
    
</div></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script>
    document.addEventListener("DOMContentLoaded", function () {
        var inputs = document.querySelectorAll("input");

        inputs.forEach((input) => {
            input.addEventListener("input", function () {
                var name = this.name;
                var value = this.value;
                var matchingInputs = document.querySelectorAll(`input[name="${name}"]`);

                matchingInputs.forEach((match) => {
                    if (match !== this) {
                        match.value = value;
                    }
                });
            });
        });
    });
</script>
</body>

</html>
