password resets
This commit is contained in:
parent
47772979ce
commit
daa283a4d4
|
|
@ -27,4 +27,18 @@ class ResetPasswordController extends Controller
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $redirectTo = RouteServiceProvider::HOME;
|
protected $redirectTo = RouteServiceProvider::HOME;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the password reset validation rules.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'token' => 'required',
|
||||||
|
'email' => 'required|email',
|
||||||
|
'password' => ['required', 'string', 'min:8', 'confirmed', 'regex:/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{6,}$/'],
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,14 +43,13 @@
|
||||||
@endif
|
@endif
|
||||||
<h3>Password</h3>
|
<h3>Password</h3>
|
||||||
<input id="password" type="password" name="password" required autocomplete="current-password">
|
<input id="password" type="password" name="password" required autocomplete="current-password">
|
||||||
<p class="important">Don't forget your password! Passwords are currently non-recoverable.</p>
|
|
||||||
@error('password')
|
@error('password')
|
||||||
<span style="color:red" role="alert">
|
<span style="color:red" role="alert">
|
||||||
<strong>{{ $message }}</strong>
|
<strong>{{ $message }}</strong>
|
||||||
</span>
|
</span>
|
||||||
@enderror
|
@enderror
|
||||||
<br>
|
<br>
|
||||||
<input style="width:5%;margin-bottom:15px" type="checkbox" name="remember" id="remember"
|
<input style="width:5%;margin-bottom:15px;margin-top:15px" type="checkbox" name="remember" id="remember"
|
||||||
{{ old('remember') ? 'checked' : '' }}>
|
{{ old('remember') ? 'checked' : '' }}>
|
||||||
|
|
||||||
<label class="form-check-label" for="remember">
|
<label class="form-check-label" for="remember">
|
||||||
|
|
@ -58,10 +57,10 @@
|
||||||
</label>
|
</label>
|
||||||
<button type="submit" class="greenbutton">Log in!</button>
|
<button type="submit" class="greenbutton">Log in!</button>
|
||||||
@if (Route::has('password.request'))
|
@if (Route::has('password.request'))
|
||||||
<br>
|
<br><br>
|
||||||
<a class="btn btn-link" href="{{ route('password.request') }}"
|
<a class="btn btn-link" href="{{ route('password.request') }}"
|
||||||
style="text-align:center;display:block;width:90%">
|
style="text-align:center;display:block;width:90%">
|
||||||
{{ __('Forgot Your Password?') }}
|
Forgot Your Password?
|
||||||
</a>
|
</a>
|
||||||
@endif
|
@endif
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -1,47 +1,34 @@
|
||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
@section('title')
|
||||||
|
<title>Reset Password - {{ env('APP_NAME') }}</title>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('alert')
|
||||||
|
@if (session('status'))
|
||||||
|
<div id="alert"
|
||||||
|
style="background:linear-gradient(0deg,#02b757 0%,#118237 49%,#01a64e 50%,#3fc679 95%,#a3e2bd 100%)"
|
||||||
|
role="alert">
|
||||||
|
{{ session('status') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container">
|
<h1>Reset Password</h1>
|
||||||
<div class="row justify-content-center">
|
<form method="POST" action="{{ route('password.email') }}">
|
||||||
<div class="col-md-8">
|
@csrf
|
||||||
<div class="card">
|
<h3>Email Address</h3>
|
||||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
<input id="email" type="email" name="email" value="{{ old('email') }}" required autocomplete="email"
|
||||||
|
placeholder="Email address..." autofocus>
|
||||||
|
@error('email')
|
||||||
|
<span class="warningtext" role="alert">
|
||||||
|
<br><strong>{{ $message }}</strong>
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
<br><br>
|
||||||
|
|
||||||
<div class="card-body">
|
<button type="submit" onClick="this.form.submit();this.disabled=true">
|
||||||
@if (session('status'))
|
Send Password Reset Link
|
||||||
<div class="alert alert-success" role="alert">
|
</button>
|
||||||
{{ session('status') }}
|
</form>
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<form method="POST" action="{{ route('password.email') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
|
|
||||||
|
|
||||||
@error('email')
|
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-0">
|
|
||||||
<div class="col-md-6 offset-md-4">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{{ __('Send Password Reset Link') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
|
|
@ -1,65 +1,43 @@
|
||||||
@extends('layouts.app')
|
@extends('layouts.app')
|
||||||
|
@section('title')
|
||||||
|
<title>Reset Password - {{ env('APP_NAME') }}</title>
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="container">
|
<h1>Reset Password</h1>
|
||||||
<div class="row justify-content-center">
|
<p>Passwords must be 8 or more characters, with 1 capital letter, 1 symbol and 1 number.</p><br>
|
||||||
<div class="col-md-8">
|
<form method="POST" action="{{ route('password.update') }}">
|
||||||
<div class="card">
|
@csrf
|
||||||
<div class="card-header">{{ __('Reset Password') }}</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
<input type="hidden" name="token" value="{{ $token }}">
|
||||||
<form method="POST" action="{{ route('password.update') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<input type="hidden" name="token" value="{{ $token }}">
|
<h3>Email Address</h3>
|
||||||
|
<input id="email" type="email" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email"
|
||||||
|
autofocus>
|
||||||
|
|
||||||
<div class="row mb-3">
|
@error('email')
|
||||||
<label for="email" class="col-md-4 col-form-label text-md-end">{{ __('Email Address') }}</label>
|
<span class="warningtext" role="alert">
|
||||||
|
<br><strong>{{ $message }}</strong>
|
||||||
|
</span>
|
||||||
|
@enderror
|
||||||
|
|
||||||
<div class="col-md-6">
|
<h3>New Password</h3>
|
||||||
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $email ?? old('email') }}" required autocomplete="email" autofocus>
|
<input id="password" type="password" name="password" required autocomplete="new-password"
|
||||||
|
placeholder="Enter your new password">
|
||||||
|
|
||||||
@error('email')
|
@error('password')
|
||||||
<span class="invalid-feedback" role="alert">
|
<span class="warningtext" role="alert">
|
||||||
<strong>{{ $message }}</strong>
|
<br><strong>{{ $message }}</strong>
|
||||||
</span>
|
</span>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
<h3>Confirm New Password</h3>
|
||||||
<label for="password" class="col-md-4 col-form-label text-md-end">{{ __('Password') }}</label>
|
<input id="password-confirm" type="password" name="password_confirmation" required autocomplete="new-password"
|
||||||
|
placeholder="Confirm your new password">
|
||||||
|
<br><br>
|
||||||
|
|
||||||
<div class="col-md-6">
|
<button type="submit" onClick="this.form.submit();this.disabled=true">
|
||||||
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="new-password">
|
Reset Password
|
||||||
|
</button>
|
||||||
@error('password')
|
</form>
|
||||||
<span class="invalid-feedback" role="alert">
|
|
||||||
<strong>{{ $message }}</strong>
|
|
||||||
</span>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-3">
|
|
||||||
<label for="password-confirm" class="col-md-4 col-form-label text-md-end">{{ __('Confirm Password') }}</label>
|
|
||||||
|
|
||||||
<div class="col-md-6">
|
|
||||||
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required autocomplete="new-password">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row mb-0">
|
|
||||||
<div class="col-md-6 offset-md-4">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
{{ __('Reset Password') }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,6 @@
|
||||||
<input id="password" type="password" name="password" required autocomplete="password">
|
<input id="password" type="password" name="password" required autocomplete="password">
|
||||||
<p>Don't reuse passwords, and don't use a simple one!</p>
|
<p>Don't reuse passwords, and don't use a simple one!</p>
|
||||||
<p>Passwords must be 8 or more characters, with 1 capital letter, 1 symbol and 1 number.</p>
|
<p>Passwords must be 8 or more characters, with 1 capital letter, 1 symbol and 1 number.</p>
|
||||||
<p class="important">Don't forget your password! Passwords are currently non-recoverable.</p>
|
|
||||||
@error('password')
|
@error('password')
|
||||||
<div class="invalid-feedback" style="color:red">
|
<div class="invalid-feedback" style="color:red">
|
||||||
<strong>{{ $message }}</strong>
|
<strong>{{ $message }}</strong>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue