From c4996ce2d9135488b17d56bd11ff794cc8d10a6b Mon Sep 17 00:00:00 2001
From: Anthony Lajusticia <lajusticia.anthony@gmail.com>
Date: Sun, 17 Nov 2024 22:48:32 +0100
Subject: [PATCH] Add missing autocomplete and name properties for email and
 password inputs

---
 resources/views/pages/auth/password/[token].blade.php | 4 ++--
 resources/views/pages/auth/password/confirm.blade.php | 2 +-
 resources/views/pages/auth/password/reset.blade.php   | 2 +-
 resources/views/pages/auth/register.blade.php         | 8 ++++----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/resources/views/pages/auth/password/[token].blade.php b/resources/views/pages/auth/password/[token].blade.php
index f1d3db4..7505afc 100644
--- a/resources/views/pages/auth/password/[token].blade.php
+++ b/resources/views/pages/auth/password/[token].blade.php
@@ -77,8 +77,8 @@ function ($user, $password) {
 
             <form wire:submit="resetPassword" class="space-y-5">
                 <x-auth::elements.input :label="config('devdojo.auth.language.passwordReset.email')" type="email" id="email" name="email" data-auth="email-input" wire:model="email" autofocus="true" />
-                <x-auth::elements.input :label="config('devdojo.auth.language.passwordReset.password')" type="password" id="password" name="password" data-auth="password-input" wire:model="password" />
-                <x-auth::elements.input :label="config('devdojo.auth.language.passwordReset.password_confirm')" type="password" id="password_confirmation" name="password_confirmation" data-auth="password-confirm-input" wire:model="passwordConfirmation" />
+                <x-auth::elements.input :label="config('devdojo.auth.language.passwordReset.password')" type="password" id="password" name="password" data-auth="password-input" wire:model="password" autocomplete="new-password" />
+                <x-auth::elements.input :label="config('devdojo.auth.language.passwordReset.password_confirm')" type="password" id="password_confirmation" name="password_confirmation" data-auth="password-confirm-input" wire:model="passwordConfirmation" autocomplete="new-password" />
                 <x-auth::elements.button type="primary" data-auth="submit-button" rounded="md" submit="true">{{config('devdojo.auth.language.passwordReset.button')}}</x-auth::elements.button>
             </form>
         </x-auth::elements.container>
diff --git a/resources/views/pages/auth/password/confirm.blade.php b/resources/views/pages/auth/password/confirm.blade.php
index 1d6767d..b240aa2 100644
--- a/resources/views/pages/auth/password/confirm.blade.php
+++ b/resources/views/pages/auth/password/confirm.blade.php
@@ -44,7 +44,7 @@ public function confirm()
                 :show_subheadline="($language->passwordConfirm->show_subheadline ?? false)"
             />
             <form wire:submit="confirm" class="space-y-5">
-                <x-auth::elements.input :label="config('devdojo.auth.language.passwordConfirm.password')" type="password" id="password" name="password" data-auth="password-input" autofocus="true" wire:model="password" />
+                <x-auth::elements.input :label="config('devdojo.auth.language.passwordConfirm.password')" type="password" id="password" name="password" data-auth="password-input" autofocus="true" wire:model="password" autocomplete="current-password" />
                 <x-auth::elements.button type="primary" rounded="md" data-auth="submit-button" submit="true">{{config('devdojo.auth.language.passwordConfirm.button')}}</x-auth::elements.button>
             </form>
         </x-auth::elements.container>
diff --git a/resources/views/pages/auth/password/reset.blade.php b/resources/views/pages/auth/password/reset.blade.php
index 12c959e..14acda5 100644
--- a/resources/views/pages/auth/password/reset.blade.php
+++ b/resources/views/pages/auth/password/reset.blade.php
@@ -67,7 +67,7 @@ public function sendResetPasswordLink()
             </div>
         @else
             <form wire:submit="sendResetPasswordLink" class="space-y-5">
-                <x-auth::elements.input :label="config('devdojo.auth.language.passwordResetRequest.email')" type="email" id="email" name="email" data-auth="email-input" wire:model="email" autofocus="true" />
+                <x-auth::elements.input :label="config('devdojo.auth.language.passwordResetRequest.email')" type="email" id="email" name="email" data-auth="email-input" wire:model="email" autofocus="true" autocomplete="email" />
                 <x-auth::elements.button type="primary" data-auth="submit-button" rounded="md" submit="true">{{config('devdojo.auth.language.passwordResetRequest.button')}}</x-auth::elements.button>
             </form>
         @endif
diff --git a/resources/views/pages/auth/register.blade.php b/resources/views/pages/auth/register.blade.php
index ad596f8..16783f5 100644
--- a/resources/views/pages/auth/register.blade.php
+++ b/resources/views/pages/auth/register.blade.php
@@ -139,15 +139,15 @@ public function register()
             @php
             $autofocusEmail = ($showNameField) ? false : true;
             @endphp
-            <x-auth::elements.input :label="config('devdojo.auth.language.register.email_address')" id="email" type="email" wire:model="email" data-auth="email-input" :autofocus="$autofocusEmail" required />
+            <x-auth::elements.input :label="config('devdojo.auth.language.register.email_address')" id="email" name="email" type="email" wire:model="email" data-auth="email-input" :autofocus="$autofocusEmail" autocomplete="email" required />
             @endif
 
             @if($showPasswordField)
-            <x-auth::elements.input :label="config('devdojo.auth.language.register.password')" type="password" wire:model="password" id="password" data-auth="password-input" required />
+            <x-auth::elements.input :label="config('devdojo.auth.language.register.password')" type="password" wire:model="password" id="password" name="password" data-auth="password-input" autocomplete="new-password" required />
             @endif
 
             @if($showPasswordConfirmationField)
-            <x-auth::elements.input :label="config('devdojo.auth.language.register.password_confirmation')" type="password" wire:model="password_confirmation" id="password_confirmation" data-auth="password-confirmation-input" required />
+            <x-auth::elements.input :label="config('devdojo.auth.language.register.password_confirmation')" type="password" wire:model="password_confirmation" id="password_confirmation" name="password_confirmation" data-auth="password-confirmation-input" autocomplete="new-password" required />
             @endif
 
             <x-auth::elements.button data-auth="submit-button" rounded="md" submit="true">{{config('devdojo.auth.language.register.button')}}</x-auth::elements.button>
@@ -166,4 +166,4 @@ public function register()
     </x-auth::elements.container>
     @endvolt
 
-</x-auth::layouts.app>
\ No newline at end of file
+</x-auth::layouts.app>