From 3b6b20f934eebae95def70268b2888c5006cb3a7 Mon Sep 17 00:00:00 2001 From: Anders Date: Tue, 25 Aug 2020 14:48:52 +0200 Subject: [PATCH] v0.10.15c - Changed error message when changing password (removed quotes). Added placeholder to email & phone number + added pattern to phone number --- skolehjem/app/Http/Controllers/UserController.php | 12 ++++++------ skolehjem/resources/views/app/users/edit.blade.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/skolehjem/app/Http/Controllers/UserController.php b/skolehjem/app/Http/Controllers/UserController.php index 28bf856..3ecb4c0 100644 --- a/skolehjem/app/Http/Controllers/UserController.php +++ b/skolehjem/app/Http/Controllers/UserController.php @@ -315,18 +315,18 @@ class UserController extends Controller $data = $request->only(['name_first', 'name_last', 'email', 'phone', 'password']); if ($request->input('password') != $request->input('confirmpassword')) { // If new password and new password confirm is not the same, go back with fail message. if (request()->cookie('languagesSetting') == "dk") - return redirect()->route("users.accounteditpass")->with('error#notsamepass', '

Der stod ikke det samme i `Nyt Password` & `Confirm Password`!

'); + return redirect()->route("users.accounteditpass")->with('error#notsamepass', '

Der stod ikke det samme i Nyt Password & Confirm Password!

'); elseif (request()->cookie('languagesSetting') == "en") - return redirect()->route("users.accounteditpass")->with('error#notsamepass', '

`New Password` & `Confirm Password` was not the same!

'); + return redirect()->route("users.accounteditpass")->with('error#notsamepass', '

New Password & Confirm Password was not the same!

'); else - return redirect()->route("users.accounteditpass")->with('error#notsamepass', '

Der stod ikke det samme i `Nyt Password` & `Confirm Password`!

'); + return redirect()->route("users.accounteditpass")->with('error#notsamepass', '

Der stod ikke det samme i Nyt Password & Confirm Password!

'); } elseif (!Hash::check($request->input('oldpassword'), $user->password)) { // If the written current password and current password in DB is not the same, go back with fail message. if (request()->cookie('languagesSetting') == "dk") - return redirect()->route("users.accounteditpass")->with('error#oldpass', '

Det indtastede password i `Nuværende Password` er ikke dit nuværende password!

'); + return redirect()->route("users.accounteditpass")->with('error#oldpass', '

Det indtastede password i Nuværende Password er ikke dit nuværende password!

'); elseif (request()->cookie('languagesSetting') == "en") - return redirect()->route("users.accounteditpass")->with('error#oldpass', '

The entered `Current Password` was not the same as your current password!

'); + return redirect()->route("users.accounteditpass")->with('error#oldpass', '

The entered Current Password was not the same as your current password!

'); else - return redirect()->route("users.accounteditpass")->with('error#oldpass', '

Det indtastede password i `Nuværende Password` er ikke dit nuværende password!

'); + return redirect()->route("users.accounteditpass")->with('error#oldpass', '

Det indtastede password i Nuværende Password er ikke dit nuværende password!

'); } else { // If new password and current password is the same AND current written and current DB password is the same. Then update and logout. /** @var User $user */ $user->update($data); diff --git a/skolehjem/resources/views/app/users/edit.blade.php b/skolehjem/resources/views/app/users/edit.blade.php index 4260367..57e37b5 100644 --- a/skolehjem/resources/views/app/users/edit.blade.php +++ b/skolehjem/resources/views/app/users/edit.blade.php @@ -13,9 +13,9 @@ {{__('msg.navn')}}: name_last }}" disabled> {{__('msg.email')}}: - + {{__('msg.telefon')}} Nr.: - + {{__('msg.tilbage')}}