<div class="gh-flow">
    <div class="gh-flow-content-wrap">
        <section class="gh-flow-content">
            <form id="login" method="post" class="gh-signin" novalidate="novalidate" {{action "authenticate" on="submit"}}>
                <GhFormGroup @errors={{this.signin.errors}} @hasValidated={{this.hasValidated}} @property="identification">
                    <span class="gh-input-icon gh-icon-mail">
                        {{svg-jar "email"}}
                        <GhTrimFocusInput
                            @class="email"
                            @type="email"
                            @placeholder="Email Address"
                            @name="identification"
                            @autocapitalize="off"
                            @autocorrect="off"
                            @autocomplete="username"
                            @tabindex="1"
                            @value={{readonly this.signin.identification}}
                            @input={{action (mut this.signin.identification) value="target.value"}}
                            @focus-out={{action "validate" "identification"}}
                        />
                    </span>
                </GhFormGroup>
                <GhFormGroup @errors={{this.signin.errors}} @hasValidated={{this.hasValidated}} @property="password">
                    <span class="gh-input-icon gh-icon-lock forgotten-wrap">
                        {{svg-jar "lock"}}
                        <GhTextInput
                            @class="password"
                            @type="password"
                            @placeholder="Password"
                            @name="password"
                            @tabindex="2"
                            @autocomplete="current-password"
                            @autocorrect="off"
                            @value={{readonly this.signin.password}}
                            @input={{action (mut this.signin.password) value="target.value"}} />

                        <GhTaskButton
                            @task={{this.forgotten}}
                            @class="forgotten-link gh-btn gh-btn-link gh-btn-icon"
                            @tabindex="4"
                            @type="button"
                            @successClass=""
                            @failureClass=""
                            as |task|
                        >
                            <span>{{#if task.isRunning}}{{svg-jar "spinner" class="gh-spinner"}}{{else}}Forgot?{{/if}}</span>
                        </GhTaskButton>
                    </span>
                </GhFormGroup>

                <GhTaskButton @buttonText="Sign in"
                    @task={{this.validateAndAuthenticate}}
                    @showSuccess={{false}}
                    @class="login gh-btn gh-btn-blue gh-btn-block gh-btn-icon"
                    @type="submit"
                    @tabindex="3" />
            </form>

            <p class="main-error">{{if this.flowErrors this.flowErrors}}&nbsp;</p>
        </section>
    </div>
</div>
