@extends('layouts.app')

@section('content')
<div class="main">
    <div class="container d-flex justify-content-center align-items-center vh-100">
        <div class="bg-white text-center p-5 mt-3 center w-50">
            <h4>ลืมรหัสผ่าน</h4>
            @if (session('status'))
            <div class="alert alert-success" role="alert">
                <p>{{ session('status') }}</p>
            </div>
            @endif
            <form class="pb-3 mt-4" method="POST" action="{{ route('password.email') }}">
                @csrf
                <div class="form-group">
                    <input id="email" type="text" class="form-control @error('email') is-invalid @enderror"  name="email" value="{{ old('email') }}" placeholder="ชื่อผู้ใช้ หรือ email" required autocomplete="email" autofocus>
                    @error('email')
                    <span class="invalid-feedback" role="alert">
                        <strong>{{ $message }}</strong>
                    </span>
                    @enderror
                </div>
                <div class="mt-4">
                    <a href="{{ route('home.index') }}" class="btn btn-outline-secondary float-left"><i class="fas fa-chevron-left"></i> ยกเลิก</a>
                    <button type="submit" class="btn btn-primary float-right">ส่งคำขอเปลี่ยนรหัสผ่าน</button>
                </div>
            </form>
        </div>
    </div>
</div>
@endsection
