From e1b80ae0969cbeee584427b376bc27d450d3b68f Mon Sep 17 00:00:00 2001 From: Andy Heathershaw Date: Mon, 10 Apr 2017 21:04:10 +0100 Subject: [PATCH] #12: Added a page for the current user to change their password - still needs hooking up to the controller --- .../Auth/ChangePasswordController.php | 35 +++++++++++ resources/lang/en/auth.php | 2 + resources/lang/en/navigation.php | 1 + .../auth/passwords/change_password.blade.php | 61 +++++++++++++++++++ .../themes/base/partials/navbar.blade.php | 1 + routes/web.php | 19 +----- 6 files changed, 101 insertions(+), 18 deletions(-) create mode 100644 app/Http/Controllers/Auth/ChangePasswordController.php create mode 100644 resources/views/themes/base/auth/passwords/change_password.blade.php diff --git a/app/Http/Controllers/Auth/ChangePasswordController.php b/app/Http/Controllers/Auth/ChangePasswordController.php new file mode 100644 index 0000000..9eb10d8 --- /dev/null +++ b/app/Http/Controllers/Auth/ChangePasswordController.php @@ -0,0 +1,35 @@ +middleware('auth'); + } + + public function showChangePasswordForm(Request $request) + { + return Theme::render('auth.passwords.change_password'); + } +} \ No newline at end of file diff --git a/resources/lang/en/auth.php b/resources/lang/en/auth.php index de97503..5a61ca2 100644 --- a/resources/lang/en/auth.php +++ b/resources/lang/en/auth.php @@ -20,6 +20,8 @@ return [ 'and password you provided when you registered.', 'activation_required_message' => 'An e-mail containing an activation link has been sent to the e-mail address you provided. ' . 'Please click the link in this e-mail to activate your account.', + 'change_password_action' => 'Change password', + 'change_password_title' => 'Change your password', 'forgot_password_action' => 'Send Reset E-mail', 'forgot_password_link' => 'Forgotten your password?', 'forgot_password_title' => 'Send password reset link', diff --git a/resources/lang/en/navigation.php b/resources/lang/en/navigation.php index 4a1ff51..a6cbc24 100644 --- a/resources/lang/en/navigation.php +++ b/resources/lang/en/navigation.php @@ -24,6 +24,7 @@ return [ 'navbar' => [ 'admin' => 'Manage', 'albums' => 'Albums', + 'change_password' => 'Change password', 'login' => 'Login', 'logout' => 'Logout', 'register' => 'Register' diff --git a/resources/views/themes/base/auth/passwords/change_password.blade.php b/resources/views/themes/base/auth/passwords/change_password.blade.php new file mode 100644 index 0000000..6f4ad71 --- /dev/null +++ b/resources/views/themes/base/auth/passwords/change_password.blade.php @@ -0,0 +1,61 @@ +@extends('themes.base.layout') + +@section('title', trans('auth.change_password_title')) +@section('content') +
+
+
+
+
+ +
+
+
+ {{ csrf_field() }} + +
+ + +
+ + + @if ($errors->has('password')) + + @endif +
+
+ +
+ +
+ + + @if ($errors->has('password_confirmation')) + + @endif +
+
+ +
+
+ @lang('forms.cancel_action') + +
+
+
+
+
+
+
+
+@endsection diff --git a/resources/views/themes/base/partials/navbar.blade.php b/resources/views/themes/base/partials/navbar.blade.php index dd6a5cb..0b5b99b 100644 --- a/resources/views/themes/base/partials/navbar.blade.php +++ b/resources/views/themes/base/partials/navbar.blade.php @@ -41,6 +41,7 @@ {{--{{ Auth::user()->name }}--}}