Skip to content

Commit

Permalink
Add autocomplete properties on email and password inputs in login page
Browse files Browse the repository at this point in the history
  • Loading branch information
alajusticia committed Nov 17, 2024
1 parent 224800f commit 09ff48a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions resources/views/pages/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function authenticate()
</x-auth::elements.input-placeholder>
@else
@if($showIdentifierInput)
<x-auth::elements.input :label="config('devdojo.auth.language.login.email_address')" type="email" wire:model="email" autofocus="true" data-auth="email-input" id="email" required />
<x-auth::elements.input :label="config('devdojo.auth.language.login.email_address')" type="email" wire:model="email" autofocus="true" data-auth="email-input" id="email" name="email" autocomplete="email" required />
@endif
@endif

Expand All @@ -174,13 +174,17 @@ public function authenticate()
@endif
@endif

@if($showPasswordField)
<x-auth::elements.input :label="config('devdojo.auth.language.login.password')" type="password" wire:model="password" id="password" data-auth="password-input" />
<x-auth::elements.checkbox :label="config('devdojo.auth.language.login.remember_me')" wire:model="rememberMe" id="remember-me" data-auth="remember-me-input" />
<div class="flex items-center justify-between mt-6 text-sm leading-5">
@php
$passwordFieldClasses = $showPasswordField ? 'flex flex-col gap-6' : 'hidden';
@endphp

<div class="{{ $passwordFieldClasses }}">
<x-auth::elements.input :label="config('devdojo.auth.language.login.password')" type="password" wire:model="password" data-auth="password-input" id="password" name="password" autocomplete="current-password" />
<x-auth::elements.checkbox :label="config('devdojo.auth.language.login.remember_me')" wire:model="rememberMe" id="remember-me" data-auth="remember-me-input" />
<div class="flex items-center justify-between text-sm leading-5">
<x-auth::elements.text-link href="{{ route('auth.password.request') }}" data-auth="forgot-password-link">{{ config('devdojo.auth.language.login.forget_password') }}</x-auth::elements.text-link>
</div>
@endif
</div>

<x-auth::elements.button type="primary" data-auth="submit-button" rounded="md" size="md" submit="true">
{{ config('devdojo.auth.language.login.button') }}
Expand Down

0 comments on commit 09ff48a

Please sign in to comment.