@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 (strstr(session('url.intended'), 'time_tracker')) {{ trans('texts.time_tracker_login') }} @else {{ trans('texts.account_login') }} @endif


@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
    @if (Utils::isWhiteLabel())

    {!! link_to('/recover_password', trans('texts.recover_password')) !!}
    @else
    {!! link_to('/recover_password', trans('texts.recover_password')) !!}
    @if (Utils::isTimeTracker()) {!! link_to('#', trans('texts.self_host_login'), ['onclick' => 'setSelfHostUrl()']) !!} @else {!! link_to(NINJA_WEB_URL.'/knowledge-base/', trans('texts.knowledge_base'), ['target' => '_blank']) !!} @endif
    @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