Skip to content

Commit

Permalink
[1.x] Fix duplicate password fields (#332)
Browse files Browse the repository at this point in the history
* Fix duplicate password fields

* Update update-password-form.blade.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
tonysm and taylorotwell authored Nov 24, 2023
1 parent d46fde7 commit 60f339c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
@method('put')

<div>
<x-input-label for="current_password" :value="__('Current Password')" />
<x-text-input id="current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
<x-input-label for="update_password_current_password" :value="__('Current Password')" />
<x-text-input id="update_password_current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
<x-input-error :messages="$errors->updatePassword->get('current_password')" class="mt-2" />
</div>

<div>
<x-input-label for="password" :value="__('New Password')" />
<x-text-input id="password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-label for="update_password_password" :value="__('New Password')" />
<x-text-input id="update_password_password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-error :messages="$errors->updatePassword->get('password')" class="mt-2" />
</div>

<div>
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
<x-text-input id="password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-label for="update_password_password_confirmation" :value="__('Confirm Password')" />
<x-text-input id="update_password_password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-error :messages="$errors->updatePassword->get('password_confirmation')" class="mt-2" />
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@

<form wire:submit="updatePassword" class="mt-6 space-y-6">
<div>
<x-input-label for="current_password" :value="__('Current Password')" />
<x-text-input wire:model="current_password" id="current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
<x-input-label for="update_password_current_password" :value="__('Current Password')" />
<x-text-input wire:model="current_password" id="update_password_current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
<x-input-error :messages="$errors->get('current_password')" class="mt-2" />
</div>

<div>
<x-input-label for="password" :value="__('New Password')" />
<x-text-input wire:model="password" id="password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-label for="update_password_password" :value="__('New Password')" />
<x-text-input wire:model="password" id="update_password_password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-error :messages="$errors->get('password')" class="mt-2" />
</div>

<div>
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
<x-text-input wire:model="password_confirmation" id="password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-label for="update_password_password_confirmation" :value="__('Confirm Password')" />
<x-text-input wire:model="password_confirmation" id="update_password_password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ public function updatePassword(): void

<form wire:submit="updatePassword" class="mt-6 space-y-6">
<div>
<x-input-label for="current_password" :value="__('Current Password')" />
<x-text-input wire:model="current_password" id="current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
<x-input-label for="update_password_current_password" :value="__('Current Password')" />
<x-text-input wire:model="current_password" id="update_password_current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
<x-input-error :messages="$errors->get('current_password')" class="mt-2" />
</div>

<div>
<x-input-label for="password" :value="__('New Password')" />
<x-text-input wire:model="password" id="password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-label for="update_password_password" :value="__('New Password')" />
<x-text-input wire:model="password" id="update_password_password" name="password" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-error :messages="$errors->get('password')" class="mt-2" />
</div>

<div>
<x-input-label for="password_confirmation" :value="__('Confirm Password')" />
<x-text-input wire:model="password_confirmation" id="password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-label for="update_password_password_confirmation" :value="__('Confirm Password')" />
<x-text-input wire:model="password_confirmation" id="update_password_password_confirmation" name="password_confirmation" type="password" class="mt-1 block w-full" autocomplete="new-password" />
<x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
</div>

Expand Down

0 comments on commit 60f339c

Please sign in to comment.