@extends('layouts.sub')

@section('content')
<div id="passwordReset" class="container-fluid">
    <header>
        <a href="/" type="text/html" rel="noreferrer" referrerpolicy="no-referrer">
            {{ strtoupper(config('app.name')) }}
        </a>
    </header>
    <main>

        <h5>{{ __('Reset Password') }}</h5>

        <form name="f_password_reset" id="fPasswordReset" method="post" action="{{ route('password.update') }}" accept-charset="UTF-8">
            @csrf
            <input type="hidden" name="token" value="{{ $token }}"/>

            <div class="mb-3">
                <label for="email" class="form-label">{{ __('Email Address') }}</label>
                <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" readonly/>

                @error('email')
                <span class="invalid-feedback" role="alert">
                    <strong>{{ $message }}</strong>
                </span>
                @enderror
            </div>

            <div class="mb-3">
                <label for="password" class="form-label">{{ __('Password') }}</label>
                <input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password"/>

                @error('password')
                <span class="invalid-feedback" role="alert">
                    <strong>{{ $message }}</strong>
                </span>
                @enderror
            </div>

            <div class="mb-3">
                <label for="password-confirm" class="form-label">{{ __('Confirm Password') }}</label>
                <input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password"/>
            </div>

            <div class="mb-3">
                <button type="submit" class="btn btn-success w-100">
                    {{ __('Reset Password') }}
                </button>
            </div>

            <div class="mb-3 text-center">
                @if (Route::has('login'))
                    <a href="{{ route('login') }}">≪ {{ __('Login') }}</a>
                @endif
            </div>
        </form>

        <hr/>

        <footer>
            Copyright (C) @ {{ date('Y') }} {{ config('company_name') }} Corp. All Rights Reserved.
        </footer>
    </main>
</div>
@endsection

@push('styles')
    <link rel="stylesheet" href="{{ asset('css/auth/passwords.css') }}"/>
@endpush

@push('scripts')
    <script src="{{ asset('/js/auth/passwords.js') }}"></script>
@endpush

