Update password reset views and fix layout in ForcePasswordReset.php and reset-password.blade.php

This commit is contained in:
Andras Bacsai 2024-04-12 09:26:07 +02:00
parent 2382a10bba
commit 0267c76de2
3 changed files with 53 additions and 51 deletions

View File

@ -24,7 +24,7 @@ public function mount()
}
public function render()
{
return view('livewire.force-password-reset')->layout('layouts.simple');
return view('livewire.force-password-reset');
}
public function submit()
{

View File

@ -1,41 +1,41 @@
<x-layout-simple>
<div class="min-h-screen hero">
<div>
<div class="flex flex-col items-center ">
<a href="{{ route('dashboard') }}">
<div class="text-5xl font-bold tracking-tight text-center dark:text-white">Coolify</div>
</a>
</div>
<div class="flex items-center justify-center pb-4 text-center">
<section class="bg-gray-50 dark:bg-base">
<div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
<a class="flex items-center text-5xl font-extrabold tracking-tight text-gray-900 dark:text-white">
Coolify
</a>
<div class="flex items-center justify-center pb-6 text-center">
{{ __('auth.reset_password') }}
</div>
<div>
<form action="/reset-password" method="POST" class="flex flex-col gap-2">
@csrf
<input hidden id="token" name="token" value="{{ request()->route('token') }}">
<input hidden value="{{ request()->query('email') }}" type="email" name="email"
label="{{ __('input.email') }}" />
<div class="flex flex-col gap-2">
<x-forms.input required type="password" id="password" name="password"
label="{{ __('input.password') }}" autofocus />
<x-forms.input required type="password" id="password_confirmation" name="password_confirmation"
label="{{ __('input.password.again') }}" />
</div>
<x-forms.button type="submit">{{ __('auth.reset_password') }}</x-forms.button>
</form>
@if ($errors->any())
<div class="text-xs text-center text-error">
@foreach ($errors->all() as $error)
<p>{{ $error }}</p>
@endforeach
</div>
@endif
@if (session('status'))
<div class="mb-4 font-medium text-green-600">
{{ session('status') }}
</div>
@endif
<div class="w-full bg-white shadow md:mt-0 sm:max-w-md xl:p-0 dark:bg-base ">
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
<form action="/reset-password" method="POST" class="flex flex-col gap-2">
@csrf
<input hidden id="token" name="token" value="{{ request()->route('token') }}">
<input hidden value="{{ request()->query('email') }}" type="email" name="email"
label="{{ __('input.email') }}" />
<div class="flex flex-col gap-2">
<x-forms.input required type="password" id="password" name="password"
label="{{ __('input.password') }}" autofocus />
<x-forms.input required type="password" id="password_confirmation"
name="password_confirmation" label="{{ __('input.password.again') }}" />
</div>
<x-forms.button type="submit">{{ __('auth.reset_password') }}</x-forms.button>
</form>
@if ($errors->any())
<div class="text-xs text-center text-error">
@foreach ($errors->all() as $error)
<p>{{ $error }}</p>
@endforeach
</div>
@endif
@if (session('status'))
<div class="mb-4 font-medium text-green-600">
{{ session('status') }}
</div>
@endif
</div>
</div>
</div>
</div>
</section>
</x-layout-simple>

View File

@ -1,17 +1,19 @@
<div class="min-h-screen hero">
<div class="w-96 min-w-fit">
<div class="flex flex-col items-center">
<a href="{{ route('dashboard') }}">
<div class="text-5xl font-bold tracking-tight text-center dark:text-white">Coolify</div>
</a>
<section class="bg-gray-50 dark:bg-base">
<div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
<a class="flex items-center mb-6 text-5xl font-extrabold tracking-tight text-gray-900 dark:text-white">
Coolify
</a>
<div class="w-full bg-white shadow md:mt-0 sm:max-w-md xl:p-0 dark:bg-base ">
<div class="p-6 space-y-4 md:space-y-6 sm:p-8">
<form class="flex flex-col gap-2" wire:submit='submit'>
<x-forms.input id="email" type="email" placeholder="Email" readonly label="Email" />
<x-forms.input id="password" type="password" placeholder="New Password" label="New Password"
required />
<x-forms.input id="password_confirmation" type="password" placeholder="Confirm New Password"
label="Confirm New Password" required />
<x-forms.button type="submit">Reset Password</x-forms.button>
</form>
</div>
</div>
<form class="flex flex-col gap-2" wire:submit='submit'>
<x-forms.input id="email" type="email" placeholder="Email" readonly label="Email" />
<x-forms.input id="password" type="password" placeholder="New Password" label="New Password" required />
<x-forms.input id="password_confirmation" type="password" placeholder="Confirm New Password"
label="Confirm New Password" required />
<x-forms.button type="submit">Reset Password</x-forms.button>
</form>
</div>
</div>
</section>