<script src="libs/inWeboBrowserXUI-1.0.1-min.js"></script>
<script language="JavaScript" type="text/javascript">
    $("document").ready(function() {
        var inWeboAuthType = $("input[name='callback_2']").val();
        var inWeboPushActivate = $("input[name='callback_4']").val();
        if (inWeboAuthType === "BROWSER") {
            startVa(inWeboPushActivate);
        } else if (inWeboAuthType === "PUSH") {
            startPushForm();
        } else {
            startOtpDisplay();
        }
    });
</script>

{{inWeboInit}}

<div class="container text-center">
    {{#if reqs.header}}
    <div class="page-header">
        <h1 class="text-center">{{reqs.header}}</h1>
    </div>
    {{/if}}

    <div id="loginContent">
        <div id="vaContainer" class="vaContent col-sm-6 col-sm-offset-3" style="display:none;"></div>
        <div id="helium_form" class="heContent" style="display:none;margin:auto;width:457px"></div>
        <div style="display:none;">
            <div id="helium_push" class="heContent" style="display:none;"></div>
        </div>
        <div id="inWeboPush" style="display:none;">
            {{inWeboPushRender}}
        </div>
        <div id="loginForm" style="display:none;">
            <form id="Login" name="Login" action="" method="post" class="form login col-sm-6 col-sm-offset-3" autocomplete="off" data-stage="{{reqs.stage}}">
                <fieldset class="row">
                    {{#each reqs.callbacks}}
                    {{#if isSubmit}}
                    {{#if ../../showRememberLogin}}
                    {{> login/_RememberLogin }}
                    {{/if}}
                    {{/if}}

                    <div class="form-group">
                        {{inWeboCallbackRender}}
                    </div>
                    {{/each}}

                    {{> login/_SelfService }}

                    {{#if showSocialLogin}}
                    {{> login/_SocialAuthn }}
                    {{/if}}
                </fieldset>
            </form>
        </div>
        <div class="col-sm-6 col-sm-offset-3">
            <button type="button" onclick="startOtpDisplay();" class="btn btn-link">Log in using an OTP generated by inWebo Authenticator</button>
        </div>
    </div>
</div>
