Skip to content

Commit e7e343b

Browse files
committed
update tampilan dan pesan error
1 parent e12707b commit e7e343b

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

app/Http/Controllers/Auth/ProfileController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public function updatePassword(ChangePasswordRequest $request): RedirectResponse
7777
if (! Hash::check($request->current_password, $user->password)) {
7878
return back()
7979
->withInput()
80-
->with('error', trans('password.change_failed'));
80+
->withErrors(['current_password' => trans('passwords.change_failed')])
81+
->with('error', trans('passwords.change_failed'));
8182
}
8283

8384
$user->update([
@@ -93,6 +94,6 @@ public function updatePassword(ChangePasswordRequest $request): RedirectResponse
9394

9495
}
9596

96-
return back()->with('success', trans('password.change_success'));
97+
return back()->with('success', trans('passwords.change_success'));
9798
}
9899
}

resources/views/auth/password.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<!-- Password Saat Ini -->
4646
<div class="form-group {{ $errors->has('current_password') ? 'has-error' : '' }}">
4747
<label for="current_password" class="col-sm-3 control-label">
48-
<i class="fa fa-key text-primary"></i> Password Saat Ini
48+
Password Saat Ini
4949
</label>
5050
<div class="col-sm-6">
5151
<input type="password" class="form-control" id="current_password"
@@ -63,9 +63,9 @@
6363
<!-- Password Baru -->
6464
<div class="form-group {{ $errors->has('password') ? 'has-error' : '' }}">
6565
<label for="password" class="col-sm-3 control-label">
66-
<i class="fa fa-lock text-primary"></i> Password Baru
66+
Password Baru
6767
</label>
68-
<div class="col-sm-7">
68+
<div class="col-sm-6">
6969
<input type="password" class="form-control" id="password"
7070
name="password" placeholder="Masukkan password baru (min. 8 karakter)" required autocomplete="new-password">
7171
<!-- Password Strength Indicator -->
@@ -89,7 +89,7 @@
8989
<!-- Konfirmasi Password Baru -->
9090
<div class="form-group {{ $errors->has('password_confirmation') ? 'has-error' : '' }}">
9191
<label for="password_confirmation" class="col-sm-3 control-label">
92-
<i class="fa fa-check-circle text-primary"></i> Konfirmasi Password
92+
Konfirmasi Password
9393
</label>
9494
<div class="col-sm-6">
9595
<input type="password" class="form-control" id="password_confirmation"

0 commit comments

Comments
 (0)