diff --git a/stubs/app/Orchid/Layouts/User/UserPasswordLayout.php b/stubs/app/Orchid/Layouts/User/UserPasswordLayout.php index 881d97069..73c8e7f84 100644 --- a/stubs/app/Orchid/Layouts/User/UserPasswordLayout.php +++ b/stubs/app/Orchid/Layouts/User/UserPasswordLayout.php @@ -21,14 +21,17 @@ public function fields(): array /** @var User $user */ $user = $this->query->get('user'); - $placeholder = $user->exists + $exists = $user->exists; + + $placeholder = $exists ? __('Leave empty to keep current password') : __('Enter the password to be set'); return [ Password::make('user.password') ->placeholder($placeholder) - ->title(__('Password')), + ->title(__('Password')) + ->required(!$exists), ]; } }