From cd625ba1e158a99b8cfffe4eade2b8426976fc77 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 1 Jun 2023 08:19:33 +0200 Subject: [PATCH] init forgot password --- app/Providers/FortifyServiceProvider.php | 3 ++ lang/en.json | 2 +- .../views/auth/forgot-password.blade.php | 50 +++++++++++++++++++ resources/views/auth/login.blade.php | 5 +- 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 resources/views/auth/forgot-password.blade.php diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 2a8a22d18..570219cf5 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -55,6 +55,9 @@ class FortifyServiceProvider extends ServiceProvider return $user; } }); + Fortify::requestPasswordResetLinkView(function () { + return view('auth.forgot-password'); + }); Fortify::createUsersUsing(CreateNewUser::class); Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class); Fortify::updateUserPasswordsUsing(UpdateUserPassword::class); diff --git a/lang/en.json b/lang/en.json index c3fb7e03e..3816ace19 100644 --- a/lang/en.json +++ b/lang/en.json @@ -4,7 +4,7 @@ "auth.register-now": "Register now!", "auth.logout": "Logout", "auth.register": "Register", - "auth.registration_disabled": "Registration is disabled.", + "auth.registration_disabled": "Registration is disabled. Please contact the administrator.", "auth.reset_password": "Reset Password", "auth.failed": "These credentials do not match our records.", "auth.failed.password": "The provided password is incorrect.", diff --git a/resources/views/auth/forgot-password.blade.php b/resources/views/auth/forgot-password.blade.php new file mode 100644 index 000000000..b4a63f506 --- /dev/null +++ b/resources/views/auth/forgot-password.blade.php @@ -0,0 +1,50 @@ + + Forgot Password +
+ @csrf + + + @if (session('status')) +
+ {{ session('status') }} +
+ @endif + {{--
+
+
Coolify
+
+

{{ __('auth.login') }}

+ @if ($is_registration_enabled) + + + + @endif +
+
+
+ @csrf + @env('local') + + + @else + + + @endenv + @if ($errors->any()) +
+ {{ __('auth.failed') }} +
+ @endif + {{ __('auth.login') }} + @if (!$is_registration_enabled) +
{{ __('auth.registration_disabled') }}
+ @endif + +
+
+
--}} +
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 028d93002..d5027419e 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -9,8 +9,6 @@ - @else -
{{ __('auth.registration_disabled') }}
@endif
@@ -31,6 +29,9 @@
@endif {{ __('auth.login') }} + @if (!$is_registration_enabled) +
{{ __('auth.registration_disabled') }}
+ @endif