@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('forget.password.post') }}">
                @csrf
                <div class="form-group">
                    <input id="username" type="text" class="form-control @error('username') is-invalid @enderror"  name="username" value="{{ old('username') }}" placeholder="ชื่อผู้ใช้" required autofocus>
                    @error('username')
                    <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
