diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index a07a372f86..4303afa40a 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -54,4 +54,14 @@ class ResetPasswordController extends Controller return $this->traitSendResetResponse($response); } } + + public function showResetForm(Request $request, $token = null) + { + $passwordReset = PasswordReset::whereToken($token)->first(); + $email = $passwordReset ? $passwordReset->email : ''; + + return view('auth.passwords.reset')->with( + ['token' => $token, 'email' => $email] + ); + } } diff --git a/app/Http/Controllers/ClientAuth/ResetPasswordController.php b/app/Http/Controllers/ClientAuth/ResetPasswordController.php index 511c10cfa9..a2b379a419 100644 --- a/app/Http/Controllers/ClientAuth/ResetPasswordController.php +++ b/app/Http/Controllers/ClientAuth/ResetPasswordController.php @@ -7,6 +7,7 @@ use Config; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Http\Request; +use App\Models\PasswordReset; class ResetPasswordController extends Controller { @@ -54,8 +55,11 @@ class ResetPasswordController extends Controller public function showResetForm(Request $request, $token = null) { + $passwordReset = PasswordReset::whereToken($token)->first(); + $email = $passwordReset ? $passwordReset->email : ''; + return view('clientauth.passwords.reset')->with( - ['token' => $token] + ['token' => $token, 'email' => $email] ); } diff --git a/app/Models/PasswordReset.php b/app/Models/PasswordReset.php new file mode 100644 index 0000000000..468c9901e7 --- /dev/null +++ b/app/Models/PasswordReset.php @@ -0,0 +1,13 @@ + - {!! Former::open('/password/reset')->addClass('form-signin')->rules(array( + {!! Former::open('/password/reset') + ->addClass('form-signin') + ->autocomplete('off') + ->rules(array( 'password' => 'required', 'password_confirmation' => 'required', )) !!} + @include('partials.autocomplete_fix') +
{!! Button::success(trans('texts.save'))->large()->submit()->withAttributes(['class' => 'green'])->block() !!}
diff --git a/resources/views/clientauth/passwords/reset.blade.php b/resources/views/clientauth/passwords/reset.blade.php index 8261983a51..0c2a50005e 100644 --- a/resources/views/clientauth/passwords/reset.blade.php +++ b/resources/views/clientauth/passwords/reset.blade.php @@ -3,11 +3,16 @@ @section('form'){!! Button::success(trans('texts.save'))->large()->submit()->withAttributes(['class' => 'green'])->block() !!}
diff --git a/resources/views/partials/autocomplete_fix.blade.php b/resources/views/partials/autocomplete_fix.blade.php index ec3f8c5cdb..cc0f61d3f7 100644 --- a/resources/views/partials/autocomplete_fix.blade.php +++ b/resources/views/partials/autocomplete_fix.blade.php @@ -1,4 +1,4 @@ \ No newline at end of file +