Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit f7032c5

Browse files
fix: password form input field names (#22)
* fix input field name * flash message upon successful password change
1 parent ddb142b commit f7032c5

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

resources/lang/en/pages.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@
2626
'delete_account_title' => 'Delete Account',
2727
'delete_account_description' => 'Deletion of the account will result in the loss of your data instantly and your account will be unrecoverable.',
2828
'update_password_alert_description' => 'The Security Settings allow you to change your passwords and enable or disable 2FA. Please remember the changes made for when you next sign in.',
29+
'password_updated' => 'Password was successfully updated',
2930
],
3031
];

resources/views/profile/update-password-form.blade.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
<div class="my-8">
44
<x-ark-alert type="warning" :message="trans('fortify::pages.user-settings.update_password_alert_description')" />
55
</div>
6-
<span class="header-4">@lang('fortify::pages.user-settings.password_information_title')</span>
6+
<div>
7+
<x-ark-flash />
8+
</div>
9+
<span class="mt-4 header-4">@lang('fortify::pages.user-settings.password_information_title')</span>
710
<span class="mt-4">@lang('fortify::forms.update-password.requirements_notice')</span>
811

912
<form class="mt-8" wire:submit.prevent="updatePassword">
1013
<div class="space-y-4">
11-
<x-ark-input type="password" name="currentPassword" model="state.current_password" :label="trans('fortify::forms.current_password')" :errors="$errors" />
14+
<x-ark-input type="password" name="current_password" model="state.current_password" :label="trans('fortify::forms.current_password')" :errors="$errors" />
1215

1316
<x:ark-fortify::password-rules class="w-full" :password-rules="$passwordRules" is-typing="isTyping">
1417
<x-ark-input type="password" name="password" model="state.password" class="w-full" :label="trans('fortify::forms.new_password')" @keydown="isTyping=true" :errors="$errors" />
1518
</x:ark-fortify::password-rules>
1619

17-
<x-ark-input type="password" name="passwordConfirmation" model="state.password_confirmation" :label="trans('fortify::forms.confirm_password')" :errors="$errors" />
20+
<x-ark-input type="password" name="password_confirmation" model="state.password_confirmation" :label="trans('fortify::forms.confirm_password')" :errors="$errors" />
1821
</div>
1922
<div class="flex sm:justify-end mt-8 w-full">
2023
<button type="submit" class="button-secondary w-full sm:w-auto">@lang('fortify::actions.update')</button>

src/Components/UpdatePasswordForm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function updatePassword(UpdatesUserPasswords $updater)
4848
];
4949

5050
$this->emit('saved');
51+
52+
flash()->success(trans('fortify::pages.user-settings.password_updated'));
5153
}
5254

5355
/**

0 commit comments

Comments
 (0)