@extends('login')
@section('form')
@include('partials.warn_session', ['redirectTo' => '/logout?reason=inactive'])
{!! Former::open('login')
->rules(['email' => 'required|email', 'password' => 'required'])
->addClass('form-signin') !!}
@if (count($errors->all()))
@foreach ($errors->all() as $error)
{{ $error }}
@endforeach
@endif
@if (Session::has('warning'))
{!! Session::get('warning') !!}
@endif
@if (Session::has('message'))
{!! Session::get('message') !!}
@endif
@if (Session::has('error'))
{!! Session::get('error') !!}
@endif
@if (env('REMEMBER_ME_ENABLED'))
{{ Former::populateField('remember', 'true') }}
{!! Former::hidden('remember')->raw() !!}
@endif
{!! Former::text('email')->placeholder(trans('texts.email_address'))->raw() !!}
{!! Former::password('password')->placeholder(trans('texts.password'))->raw() !!}
{!! Button::success(trans('texts.login'))
->withAttributes(['id' => 'loginButton', 'class' => 'green'])
->large()->submit()->block() !!}
@if (Utils::isOAuthEnabled())
{{ trans('texts.login_or_existing') }}
@foreach (App\Services\AuthService::$providers as $provider)
@endforeach
@endif
{!! Former::close() !!}
@if (Utils::allowNewAccounts() && ! strstr(session('url.intended'), 'time_tracker'))
{{trans('texts.not_a_member_yet')}}
{{trans('texts.login_create_an_account')}}
{!! Button::primary(trans('texts.sign_up_now'))->asLinkTo(URL::to('/invoice_now?sign_up=true'))->withAttributes(['class' => 'blue'])->large()->submit()->block() !!}
@endif
@endsection