@extends('layouts.app')

@section('title')

Login

@parent

@stop





@section('content')

<div class="container">

          @if (Session::has('message'))

          <div class="alert alert-info alert-dismissible fade show" data-auto-dismiss="5000" role="alert">

          {!! Session::get('message') !!}         

             <button type="button" class="close" data-dismiss="alert" aria-label="Close">

              <span aria-hidden="true">&times;</span>

            </button>

          </div>

          @endif

    <div class="row justify-content-center">

        <div class="col-lg-5 col-xl-4 col-sm-7 py-4">

            <div class="card">

                <div class="card-header h4 text-center bg-primary-light text-white">{{ __('Login') }}</div>



                <div class="card-body">

                    <form class="m-0" method="POST" action="{{ route('login') }}" aria-label="{{ __('Login') }}">

                        @csrf



                        <div class="form-group row">

                            <!--label for="identity" class="col-sm-4 col-form-label text-md-right">{{ __('E-Mail/User') }}</label-->



                            <div class="col-md-12">

                                <input id="identity" type="identity" class="font-14 form-control{{ $errors->has('identity') ? ' is-invalid' : '' }}" name="identity" value="{{ old('identity') }}" placeholder="E-Mail/User" required autofocus>



                                @if ($errors->has('identity'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('identity') }}</strong>

                                    </span>

                                @endif

                            </div>

                        </div>



                        <div class="form-group row">

                            <!--label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label-->



                            <div class="col-md-12">

                                <input id="password" type="password" class="font-14 form-control{{ $errors->has('password') ? ' is-invalid' : '' }}" name="password" placeholder="Password"  required>



                                @if ($errors->has('password'))

                                    <span class="invalid-feedback" role="alert">

                                        <strong>{{ $errors->first('password') }}</strong>

                                    </span>

                                @endif

                            </div>

                        </div>

                        <div class="form-group row ">

                              <!--label for="password" class="col-md-4  col-form-label text-md-right">Captcha</label-->

                              <div class="col-md-12">

                                    <div class="captcha row col-md-12">
                                       <div class="col-md-7"> 
                                            <span>{!! captcha_img() !!}</span>
                                        </div>
                                        <div class="col-md-2">
                                            <button type="button" class="btn btn-danger" class="refresh-captcha" id="refresh-captcha">
                                            &#x21bb;
                                            </button>
                                        </div>    
                                    </div>

                                    <div class="form-group mb-4">
                                        <input id="captcha" type="text" class="form-control" placeholder="Enter Captcha" name="captcha">
                                    </div>

                                  @if ($errors->has('captcha'))

                                      <span class="invalid-feedback" style="display: block;">

                                          <strong>{{ $errors->first('captcha') }}</strong>

                                      </span>

                                  @endif

                              </div>

                        </div>

                        <div class="form-group row">

                            <div class="col-md-12">

                                <div class="form-check">

                                    <input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>



                                    <label class="form-check-label" for="remember">

                                        {{ __('Remember Me') }}

                                    </label>

                                </div>

                            </div>

                        </div>



                        <div class="form-group row mb-0">

                            <div class="col-md-12">

                                <button type="submit" class="btn bg-primary-light btn-block text-white">

                                    {{ __('Login') }}

                                </button>

                            </div>

                            <div class="col-md-12 text-center mt-3 border-top">



                                <a class="btn btn-link text-dark font-14" href="{{ route('password.request') }}">

                                    {{ __('Forgot Your Password?') }}

                                </a>

                            </div>

                        </div>

                    </form>

                </div>

            </div>

        </div>

    </div>

</div>



@endsection

