<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    @include('front/common/header')
    <body>

        <main id="main" role="main">

            <header class="header pt-4">
                <div class="container-fluid px-md-4">
                    <div class="row">
                        <div class="col-lg-4 text-left">
                            <a href="{{url('')}}" class="logo mx-1">
                                <img src="{{ asset('/front/images/logo.svg') }}" class="img-fluid" alt="">

                            </a>
                        </div>

                    </div>

                </div>
            </header>
            <section class="login-section">
                <div class="inner-login container">
                    <div class="row justify-content-center">
                        <div class="col-md-11 login-box shadow px-0">
                            <div class="row no-gutters ">
                                <div class="col-md-6">
                                    <div class="logo-emblem bg-gradiat-color">
                                        <img src="{{ asset('/front/images/emblem.svg') }}" width="250" alt="">
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="login-form">


                                        <h3 class="h2 py-2 text-uppercase bg-gradiant-left d-inline-block px-4 my-4 text-white">Welcome Back</h3>
                                        {!! Form::open(array('url' => 'check-login','files' => true,'id' => 'login-form')) !!}

                                        <div class="py-4 px-5">
                                            @if(Session::has('reset_message'))
                                            <p style="width:100%; margin:auto;" class="alert alert-info">{{ Session::get('reset_message') }}</p>
                                            @endif
                                            <br>    

                                            <h4 class="h3 mb-0">LOGIN TO YOUR ACCOUNT</h4>
                                            <div class="col-lg-12" id="errors"></div>
                                            <p class="font-weight-bold">View your transactions with <?php echo env("APP_NAME") ?></p>
                                            <div class="form-group mb-lg-4">
                                                <input type="email" name="email" id="email" value="" class="form-control bg-light form-control-lg" placeholder="Email">
                                            </div>
                                            <div class="form-group pt-1">
                                                <input type="password" name="password" id="password" value="" class="form-control bg-light form-control-lg" placeholder="Password">
                                            </div>
                                            <div class="form-group row no-gutters ">
                                                <div class="col-5">
                                                    <input type="checkbox" name="remeber"> Remember Me
                                                </div>
                                                <div class="col text-right">
                                                    <a href="{{url('forgot_password')}}" class="small"><span class="text-primary">Forgot your password?</span></a>
                                                </div>
                                            </div>
                                            <div class="form-group text-center pt-4">
                                                <button  type="button" class="btn btn-lg login-btn bg-success-grandiant text-white"><i style="top:0;" class="fas  fa-location-arrow mr-2"></i> Continue</button>

                                            </div>
                                        </div>
                                        {!! Form::close() !!}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </section>

        </main>

        @include('front/common/js')

        <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
        <script>

$(document).ready(function () {

    $(document).on("click", ".login-btn", function () {

        var type = "POST";
        var dataType = "json";
        var data = $('#login-form').serialize();

        var callBack = function (response) {
            if (response.error === 1) {
                displayErrors(response, "errors");
            } else
            {
                window.top.location.href = response.url;
            }
        };

        var errorCallBack = function (response) {
            displayErrors(response, "errors");
        };
        var url = "login"
        ajaxRequest(url, type, dataType, data, callBack, errorCallBack);

    });

});

        </script>
    </body>
</html>