@extends('layout.main')
@section('title') Log-In | @parent @endsection

@section('main')

    <div class='kupeza-login'>
        <div class='login-div'>
            <div class='login-picture'>
                
            </div>
            <div class='login-form'>
                <div class="authTitle-div">
                    <h3 class="authTitle">Login or <a href="{{ route('user.create') }}">Sign up</a></h3>
                </div>
                {{ Form::open(['class'=> 'loginForm', 'autocomplete'=> 'off']) }}

                    <div class="input-group {{ $errors->has('email')? 'has-error':'' }}">
                        <span class="input-group-addon"><i class="fa fa-user"></i></span>
                        <input type="email" class="form-control" name="email" value="{{ old('email') }}" placeholder="email address" style="border-radius:0 4px 4px 0">
    
                    </div>
                    {!! $errors->has('email')? '<p class="help-block">'.$errors->first('email').'</p>':'' !!}
                    <span class="help-block"></span>
    
                    <div class="input-group {{ $errors->has('password')? 'has-error':'' }}">
                        <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                        <input  type="password" class="form-control" name="password" placeholder="Password" style="border-radius:0 4px 4px 0">
                    </div>
                    {!! $errors->has('password')? '<p class="help-block">'.$errors->first('password').'</p>':'' !!}
    
                    <span class="help-block"></span>
                    <button class="btn btn-lg btn-learn btn-block" type="submit">Login</button>
                {{ Form::close() }}
                <div class='bottom-row' style="margin-top: 20px;">
                    <div class='leftlogin'>
                        <p>
                        <label class="checkbox">
                            <input type="checkbox" value="remember-me">Remember Me
                        </label>
                        </p>
                    </div>
                    <div class='rightlogin'>
                        <p style="padding-top: 10px;">
                            <a href="#" data-toggle="modal" data-target="#forgotPasswordEmail"> @lang('app.forgot_password')</a>
                        </p>
                    </div>
                </div>
                
            </div>
        </div>
        
    </div>



    

@endsection

@section('page-js')
    <script>
        var options = {closeButton : true};
        @if(session('error'))
            toastr.error('{{ session('error') }}', 'Error!', options)
        @endif
    </script>
        <script>
        var options = {closeButton : true};
        @if(session('success'))
            toastr.success('{{ session('success') }}', '<?php echo trans('app.success') ?>', options);
        @endif
    </script>
@endsection
