feat: add components to confirm password & 2fa
This commit is contained in:
parent
e92b7f83d3
commit
8f3b790b53
5
resources/views/components/confirm-password.blade.php
Normal file
5
resources/views/components/confirm-password.blade.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div class="form-group">
|
||||
<label for="currentPassword">{{ __('Re-enter your password') }}</label>
|
||||
<input class="form-control" autocomplete="current-password" type="password" name="currentPassword" id="currentPassword" required>
|
||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ $slot }} <a href="{{ route('password.request') }}">{{ __('Forgot your password?') }}</a></p>
|
||||
</div>
|
@ -0,0 +1,9 @@
|
||||
@if (Auth::user()->has2FA())
|
||||
<div class="form-group mt-5">
|
||||
|
||||
<label for="otp">{{ __('Two-factor authentication code') }}</label>
|
||||
<input type="text" id="otp" name="otp" class="form-control">
|
||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> $slot</p>
|
||||
|
||||
</div>
|
||||
@endif
|
@ -60,21 +60,14 @@
|
||||
@csrf
|
||||
@method('PATCH')
|
||||
|
||||
<div class="form-group">
|
||||
<label for="currentPassword">{{ __('Re-enter your password') }}</label>
|
||||
<input class="form-control" autocomplete="current-password" type="password" name="currentPassword" id="currentPassword" required>
|
||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('For your security, your password is always required for sensitive operations.') }} <a href="{{ route('password.request') }}">{{ __('Forgot your password?') }}</a></p>
|
||||
</div>
|
||||
<x-confirm-password>
|
||||
{{ __('For your security, your password is always required for sensitive operations.') }}
|
||||
</x-confirm-password>
|
||||
|
||||
@if (Auth::user()->has2FA())
|
||||
<div class="form-group mt-5">
|
||||
<x-confirm-second-factor>
|
||||
{{ __('You cannot recover lost 2FA secrets.') }}
|
||||
</x-confirm-second-factor>
|
||||
|
||||
<label for="otp">{{ __('Two-factor authentication code') }}</label>
|
||||
<input type="text" id="otp" name="otp" class="form-control">
|
||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> {{ __('You cannot recover lost 2FA secrets.') }}</p>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</form>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user