{{define "title"}}User Login{{end}}
{{define "description"}}Login to the Software-as-a-Service web app by SaaS Company.{{end}}
{{define "style"}}

{{end}}
{{ define "partials/app-wrapper" }}
    <div class="container" id="page-content">

        <!-- Outer Row -->
        <div class="row justify-content-center">

            <div class="col-xl-10 col-lg-12 col-md-9">

                <div class="card o-hidden border-0 shadow-lg my-5">
                    <div class="card-body p-0">
                        <!-- Nested Row within Card Body -->
                        <div class="row">
                            <div class="col-lg-6 d-none d-lg-block bg-login-image"></div>
                            <div class="col-lg-6">
                                <div class="p-5">
                                    {{ template "app-flashes" . }}

                                    <div class="text-center">
                                        <h1 class="h4 text-gray-900 mb-4">Welcome Back!</h1>
                                    </div>

                                    {{ template "validation-error" . }}

                                    <form class="user" method="post" novalidate>
                                        <div class="form-group">
                                            <input type="email"
                                                   class="form-control form-control-user {{ ValidationFieldClass $.validationErrors "AuthenticateRequest.Email" }}"
                                                   name="Email" value="{{ $.form.Email }}" placeholder="Enter Email Address...">
                                            {{template "invalid-feedback" dict "fieldName" "AuthenticateRequest.Email" "validationDefaults" $.validationDefaults "validationErrors" $.validationErrors }}
                                        </div>
                                        <div class="form-group">
                                            <input type="password"
                                                   class="form-control form-control-user {{ ValidationFieldClass $.validationErrors "AuthenticateRequest.Password" }}"
                                                   name="Password" value="{{ $.form.Password }}" placeholder="Password">
                                            {{template "invalid-feedback" dict "fieldName" "AuthenticateRequest.Password" "validationDefaults" $.validationDefaults "validationErrors" $.validationErrors }}
                                        </div>
                                        <div class="form-group">
                                            <div class="custom-control custom-checkbox small">
                                                <input type="checkbox" class="custom-control-input"
                                                       id="inputRemberMe" name="RememberMe" value="1" {{ if $.form.RememberMe }}checked="checked"{{end}}>
                                                <label class="custom-control-label" for="inputRemberMe">Remember Me</label>
                                            </div>
                                        </div>
                                        <button class="btn btn-primary btn-user btn-block">
                                            Login
                                        </button>
                                        <hr>
                                    </form>
                                    <div class="text-center">
                                        <a class="small" href="/user/reset-password">Forgot Password?</a>
                                    </div>
                                    <div class="text-center">
                                        <a class="small" href="/signup">Create an Account!</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

        </div>

    </div>
{{end}}
{{define "js"}}
<script>
    $(document).ready(function() {
        $(document).find('body').addClass('bg-gradient-primary');
    });
</script>
{{end}}
