mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-20 08:21:34 +02:00
Refactor authentication view in billing portal v3
This commit is contained in:
parent
05f8e2a72c
commit
a5672187c4
@ -5,11 +5,38 @@
|
||||
@endcomponent
|
||||
@endif
|
||||
|
||||
@if($state['code'] === false)
|
||||
<form wire:submit="authenticate">
|
||||
<div class="my-4">
|
||||
<h1 class="text-3xl font-medium">{{ ctrans('texts.contact') }}</h1>
|
||||
</div>
|
||||
|
||||
@if($state['initial_completed'] === false)
|
||||
<form wire:submit="initial">
|
||||
@csrf
|
||||
|
||||
<label for="email_address">
|
||||
<span class="input-label">{{ ctrans('texts.email_address') }}</span>
|
||||
<input wire:model="email" type="email" class="input w-full" />
|
||||
|
||||
@error('email')
|
||||
<p class="validation validation-fail block w-full" role="alert">
|
||||
{{ $message }}
|
||||
</p>
|
||||
@enderror
|
||||
</label>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="button button-block bg-primary text-white mt-4">
|
||||
{{ ctrans('texts.next') }}
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
@if($state['login_form'])
|
||||
<form wire:submit="handlePassword" class="space-y-3">
|
||||
@csrf
|
||||
|
||||
<label for="email_address">
|
||||
<div>
|
||||
<span class="input-label">{{ ctrans('texts.email_address') }}</span>
|
||||
<input wire:model="email" type="email" class="input w-full" />
|
||||
|
||||
@ -18,7 +45,41 @@
|
||||
{{ $message }}
|
||||
</p>
|
||||
@enderror
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<span class="input-label">{{ ctrans('texts.password') }}</span>
|
||||
<input wire:model="password" type="password" class="input w-full" />
|
||||
|
||||
@error('password')
|
||||
<p class="validation validation-fail block w-full" role="alert">
|
||||
{{ $message }}
|
||||
</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="button button-block bg-primary text-white mt-4">
|
||||
{{ ctrans('texts.next') }}
|
||||
</button>
|
||||
</form>
|
||||
@endif
|
||||
|
||||
@if($state['otp_form'])
|
||||
<form wire:submit="handleOtp" class="space-y-3">
|
||||
@csrf
|
||||
|
||||
<div>
|
||||
<span class="input-label">{{ ctrans('texts.code') }}</span>
|
||||
<input wire:model="otp" type="text" class="input w-full" />
|
||||
|
||||
@error('otp')
|
||||
<p class="validation validation-fail block w-full" role="alert">
|
||||
{{ $message }}
|
||||
</p>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
@ -26,7 +87,5 @@
|
||||
{{ ctrans('texts.next') }}
|
||||
</button>
|
||||
</form>
|
||||
@else
|
||||
<p>We have sent a code to {{ $email }} enter this code to proceed.</p>
|
||||
@endif
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user