@extends('breadcrumbs.auth.main')

@section('authpage')

  <div class="container">
      <div class="card login-card">
        <div class="row no-gutters">
          <div class="col-md-5">
            <img src="{{ asset(config('customization.authbanner')) }}" alt="login" class="login-card-img">
          </div>
          <div class="col-md-7">
            <div class="card-body">
              <div class="brand-wrapper">
                <img src="{{ asset(config('adminlte.logo_img_xl')) }}" alt="logo" class="logo rounded mr-2">
              </div> <!-- main content start -->

                @if(!\App\Facades\Options::getOption('enable_registrations'))
                    <p class="login-card-description">{{__('Invite validation')}}</p>

                    <div class="alert alert-warning">
                        <i class="fa fa-exclamation-circle"></i>
                        {{ __('Warning: If you clear your cookies or close your browser, you will not be able to sign up after validating your invite. Invites can\'t be validated twice. Please complete the registration process without interruption.') }}
                    </div>

                    <form action="{{ route('invitations.validate-invite') }}" method="POST" id="registerForm">
                        @csrf
                        <input type="text" name="validation_token" id="validationToken" class="form-control mb-3" value="{{ old('validation_token', $validationToken ?? '') }}" readonly tabindex="-1" style="background-color: #e9ecef; color: #495057;">                        <input type="email" name="email" id="email" class="form-control mb-3" placeholder="{{ __('Enter your email address (must be the same as the one on file)') }}" value="{{ old('email') }}" required>
                        <input name="submitValidation" id="submitValidation" class="btn btn-block login-btn mb-4" type="submit" value="{{__('Validate')}}">
                    </form>
                @else
                    <div class="alert alert-danger">
                        <b><i class="fa fa-exclamation-triangle"></i> {{ __('Looks like you\'re lost!') }}</b>
                        <p>{{ __('Sign ups are currently open. No need to validate anything!') }}</p>
                    </div>

                @endif

                <p class="login-card-footer-text">{{__('Have an account with us?')}} <a href="{{ route('login') }}" class="text-reset">{{__('Sign in here')}}</a></p>
                <nav class="login-card-footer-nav">
                  <a href="{{ config('app.terms_url') }}">{{__('Terms of Service')}}</a>
                  <a href="{{ config('app.privacy_url') }}">{{__('Privacy Policy')}}</a>
                    <a href="{{ config('app.guidelines_url') }}">{{__('Community Guidelines')}}</a>
                </nav>
            </div>
          </div>
        </div>
      </div>
    </div>

@stop
