@extends('layouts.auth')

@section('htmlheader_title')
	Forgot Password
@endsection

@section('content')
	@includeWhen(session()->has('success'),'widgets.success-row',['msg'=>session()->get('success')])

	<form class="needs-validation" method="post" action="{{ route('password.email') }}" novalidate>
		@csrf

		<div class="row">
			<div class="col-6 m-auto">
				<div class="greyframe titledbox shadow0xb0 text-center">
					<h2 class="cap">Forgot Password</h2>

					<div class="row">
						<div class="col-12">
							<label for="email" class="form-label">Email</label>
							<div class="input-group has-validation">
								<span class="input-group-text"><i class="bi bi-person-badge"></i></span>
								<input type="text" class="form-control @error('email') is-invalid @enderror" id="email" placeholder="Email" name="email" autocomplete="email" autofocus required>
								<span class="invalid-feedback" role="alert">
									@error('email')
										{{ $message }}
									@else
										Your email is required.
									@enderror
								</span>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-12">
							<a href="{{ url('/') }}" class="btn btn-danger">Cancel</a>
							<button type="submit" name="submit" class="btn btn-success float-end">Reset</button>
						</div>
					</div>

					<div class="row">
						<div class="col-12">
							<a class="link-danger" href="{{ url('login') }}">Login</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</form>
@endsection