Enabled password resets

This commit is contained in:
Deon George 2018-08-08 00:23:46 +10:00
parent a99834a6d1
commit b9cf666581
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
8 changed files with 64 additions and 177 deletions

View File

@ -38,10 +38,18 @@ class ResetPasswordController extends Controller
$this->middleware('guest');
}
protected function rules()
{
return [
'token' => 'required',
'email' => 'required|email|exists:users',
'password' => 'required|confirmed|min:6',
];
}
public function showResetForm(Request $request, $token = null)
{
return view('adminlte::auth.passwords.reset')->with(
['token' => $token, 'email' => $request->email]
);
}
}
}

View File

@ -23,7 +23,7 @@
"laravel/passport": "^6.0",
"laravel/socialite": "^3.0",
"laravel/tinker": "^1.0",
"leenooks/laravel": "^0.1.6",
"leenooks/laravel": "^0.2.0",
"quickbooks/v3-php-sdk": "^5.0",
"spatie/laravel-demo-mode": "^2.2",
"spatie/laravel-failed-job-monitor": "^3.0",

8
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "05d6e145f1dc63442830713daced798d",
"content-hash": "f7cb7e584d607fc891b5be4ddc0864dd",
"packages": [
{
"name": "acacha/user",
@ -2463,11 +2463,11 @@
},
{
"name": "leenooks/laravel",
"version": "0.1.10",
"version": "0.2.0",
"source": {
"type": "git",
"url": "https://dev.leenooks.net/leenooks/laravel",
"reference": "0bd32aab4a53a7f74d76a77165f973026ce90444"
"reference": "98b7b9f6a80274f40c7c02f3281ba78ecfb27603"
},
"require": {
"igaster/laravel-theme": "2.0.6",
@ -2503,7 +2503,7 @@
"laravel",
"leenooks"
],
"time": "2018-08-01T06:28:10+00:00"
"time": "2018-08-07T14:14:48+00:00"
},
{
"name": "maximebf/debugbar",

62
public/js/app.js vendored
View File

@ -38013,8 +38013,8 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
},
computed: {
placeholder: function placeholder() {
if (this.name === 'email') return this.trans('message.email');
return this.trans('message.username');
if (this.name === 'email') return this.trans('adminlte_lang_message.email');
return this.trans('adminlte_lang_message.username');
},
type: function type() {
if (this.name === 'email') return 'email';
@ -38044,7 +38044,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
component.redirect(response);
}, 2500);
}).catch(function (error) {
console.log(_this.trans('message.loginerror') + ':' + error);
console.log(_this.trans('adminlte_lang_message.loginerror') + ':' + error);
});
},
@ -38103,9 +38103,9 @@ var render = function() {
attrs: { id: "result" }
},
[
_vm._v(" " + _vm._s(_vm.trans("message.loggedin")) + " "),
_vm._v(_vm._s(_vm.trans("adminlte_lang_message.loggedin")) + " "),
_c("i", { staticClass: "fa fa-refresh fa-spin" }),
_vm._v(" " + _vm._s(_vm.trans("message.entering")))
_vm._v(" " + _vm._s(_vm.trans("adminlte_lang_message.entering")))
]
),
_vm._v(" "),
@ -38239,7 +38239,7 @@ var render = function() {
staticClass: "form-control",
attrs: {
type: "password",
placeholder: _vm.trans("message.password"),
placeholder: _vm.trans("adminlte_lang_message.password"),
name: "password"
},
domProps: { value: _vm.form.password },
@ -38317,7 +38317,11 @@ var render = function() {
}
}
}),
_vm._v(" " + _vm._s(_vm.trans("message.remember")) + "\n ")
_vm._v(
" " +
_vm._s(_vm.trans("adminlte_lang_message.remember")) +
"\n "
)
])
])
]),
@ -38328,7 +38332,11 @@ var render = function() {
{
staticClass: "btn btn-primary btn-block btn-flat",
attrs: { type: "submit", disabled: _vm.form.errors.any() },
domProps: { textContent: _vm._s(_vm.trans("message.buttonsign")) }
domProps: {
textContent: _vm._s(
_vm.trans("adminlte_lang_message.buttonsign")
)
}
},
[
_vm.form.submitting
@ -38530,18 +38538,22 @@ var render = function() {
}
},
[
_c("div", {
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.form.succeeded,
expression: "form.succeeded"
}
],
staticClass: "alert alert-success",
domProps: { textContent: _vm._s(_vm.result) }
}),
_c(
"div",
{
directives: [
{
name: "show",
rawName: "v-show",
value: _vm.form.succeeded,
expression: "form.succeeded"
}
],
staticClass: "alert alert-success text-center",
attrs: { id: "result" }
},
[_vm._v(_vm._s(_vm.trans("adminlte_lang_message.resetemaillink")))]
),
_vm._v(" "),
_c(
"div",
@ -38798,7 +38810,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
var component = _this;
setTimeout(function () {
component.redirect(response);
}, 3000);
}, 2500);
}).catch(function (error) {
console.log(_this.trans('adminlte_lang_message.passwordreset') + ':' + error);
});
@ -38852,10 +38864,14 @@ var render = function() {
expression: "form.succeeded"
}
],
staticClass: "alert alert-success",
staticClass: "alert alert-success text-center",
attrs: { id: "result" }
},
[_vm._v(_vm._s(_vm.result))]
[
_vm._v(_vm._s(_vm.trans("adminlte_lang_message.success")) + " "),
_c("i", { staticClass: "fa fa-refresh fa-spin" }),
_vm._v(" " + _vm._s(_vm.trans("adminlte_lang_message.loggedin")))
]
),
_vm._v(" "),
_c("input", {

View File

@ -1,6 +1,6 @@
<template>
<form method="post" @submit.prevent="submit" @keydown="clearErrors($event.target.name)">
<div class="alert alert-success" v-show="form.succeeded" v-text="result"></div>
<div class="alert alert-success text-center" v-show="form.succeeded" id="result">{{ trans('adminlte_lang_message.resetemaillink') }}</div>
<div class="form-group has-feedback" :class="{ 'has-error': form.errors.has('email') }">
<input type="email" class="form-control" :placeholder="trans('adminlte_lang_message.email')" name="email" v-model="form.email" autofocus/>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>

View File

@ -1,6 +1,6 @@
<template>
<form method="post" @submit.prevent="submit" @keydown="clearErrors($event.target.name)">
<div class="alert alert-success text-center" v-show="form.succeeded" id="result"> {{ trans('message.loggedin') }} <i class="fa fa-refresh fa-spin"></i> {{ trans('message.entering') }}</div>
<div class="alert alert-success text-center" v-show="form.succeeded" id="result">{{ trans('adminlte_lang_message.loggedin') }} <i class="fa fa-refresh fa-spin"></i> {{ trans('adminlte_lang_message.entering') }}</div>
<div class="form-group has-feedback" :class="{ 'has-error': form.errors.has('email') }" v-if="type === 'email'">
<input type="email" class="form-control" :placeholder="placeholder" :name="name" value="" v-model="form.email" @change="adddomain" autofocus/>
<span class="glyphicon form-control-feedback" :class="[icon]"></span>
@ -17,24 +17,24 @@
</transition>
</div>
<div class="form-group has-feedback" :class="{ 'has-error': form.errors.has('password') }">
<input type="password" class="form-control" :placeholder="trans('message.password')" name="password" v-model="form.password"/>
<input type="password" class="form-control" :placeholder="trans('adminlte_lang_message.password')" name="password" v-model="form.password"/>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
<transition name="fade">
<span class="help-block" v-if="form.errors.has('password')" v-text="form.errors.get('password')" id="validation_error_password"></span>
</transition>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
<input style="display:none;" type="checkbox" name="remember" v-model="form.remember"> {{ trans('message.remember') }}
<input style="display:none;" type="checkbox" name="remember" v-model="form.remember"> {{ trans('adminlte_lang_message.remember') }}
</label>
</div>
</div>
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat" v-text="trans('message.buttonsign')" :disabled="form.errors.any()"><i v-if="form.submitting" class="fa fa-refresh fa-spin"></i></button>
<button type="submit" class="btn btn-primary btn-block btn-flat" v-text="trans('adminlte_lang_message.buttonsign')" :disabled="form.errors.any()"><i v-if="form.submitting" class="fa fa-refresh fa-spin"></i></button>
</div>
</div>
</form>
@ -71,8 +71,8 @@ export default {
},
computed: {
placeholder: function () {
if (this.name === 'email') return this.trans('message.email')
return this.trans('message.username')
if (this.name === 'email') return this.trans('adminlte_lang_message.email')
return this.trans('adminlte_lang_message.username')
},
type: function () {
if (this.name === 'email') return 'email'
@ -102,7 +102,7 @@ export default {
}, 2500);
})
.catch(error => {
console.log(this.trans('message.loginerror') + ':' + error)
console.log(this.trans('adminlte_lang_message.loginerror') + ':' + error)
})
},
adddomain: function () {

View File

@ -1,6 +1,6 @@
<template>
<form method="post" @submit.prevent="submit" @keydown="clearErrors($event.target.name)">
<div class="alert alert-success" v-show="form.succeeded" id="result">{{ result }}</div>
<div class="alert alert-success text-center" v-show="form.succeeded" id="result">{{ trans('adminlte_lang_message.success') }} <i class="fa fa-refresh fa-spin"></i> {{ trans('adminlte_lang_message.loggedin') }}</div>
<input type="hidden" name="token" v-model="form.token">
<div class="form-group has-feedback" :class="{ 'has-error': form.errors.has('email') }">
<input type="email" class="form-control" :placeholder="trans('adminlte_lang_message.email')" name="email" v-model="form.email" autofocus/>
@ -64,7 +64,7 @@ export default {
var component = this;
setTimeout(function(){
component.redirect(response)
}, 3000);
}, 2500);
})
.catch(error => {
console.log(this.trans('adminlte_lang_message.passwordreset') + ':' + error)

View File

@ -1,137 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'logged' => 'You are logged in!',
'someproblems' => 'There were some problems with your input.',
'siginsession' => 'Sign in to start your session',
'remember' => 'Remember Me',
'buttonsign' => 'Sign In',
'forgotpassword' => 'I forgot my password',
'registermember' => 'Register a new membership',
'terms' => 'I agree to the terms',
'conditions' => 'Terms and conditions',
'register' => 'Register',
'login' => 'Login',
'membreship' => 'I already have a membership',
'passwordclickreset' => 'Click here to reset your password:',
'signGithub' => 'Sign in using Github',
'signFacebook' => 'Sign in using Facebook',
'signTwitter' => 'Sign in using Twitter',
'signGoogle+' => 'Sign in using Google+',
'signLinkedin' => 'Sign in using Linkedin',
'sendpassword' => 'Send Password Reset Link',
'passwordreset' => 'Reset password',
'pagenotfound' => 'Page not found',
'404error' => '404 Error Page',
'notfindpage' => 'We could not find the page you were looking for.',
'mainwhile' => 'Meanwhile, you may',
'returndashboard' => 'return to dashboard',
'usingsearch' => 'or try using the search form.',
'search' => 'Search',
'servererror' => 'Server Error',
'500error' => '500 Error Page',
'somethingwrong' => 'Something went wrong.',
'wewillwork' => 'We will work on fixing that right away.',
'serviceunavailable' => 'Service unavailable',
'503error' => '503 Error Page',
'level' => 'Level',
'here' => 'Here',
'recentactivity' => 'Recent Activity',
'descriptionpackage' => 'A Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template',
'createdby' => 'Created by',
'seecode' => 'See code at',
'online' => 'Online',
'home' => 'Home',
'header' => 'HEADER',
'anotherlink' => 'Another Link',
'multilevel' => 'Multilevel',
'linklevel2' => 'Link in level2',
'birthday' => 'Langdon\'s Birthday',
'birthdaydate' => 'Will be 23 on April 24th',
'progress' => 'Tasks Progress',
'customtemplate' => 'Custom Template Design',
'statstab' => 'Stats Tab Content',
'generalset' => 'General Settings',
'reportpanel' => 'Report panel usage',
'checked' => 'checked',
'informationsettings' => 'Some information about this general settings option',
'togglenav' => 'Toggle navigation',
'tabmessages' => 'You have 4 messages',
'supteam' => 'Support Team',
'awesometheme' => 'Why not buy a new awesome theme?',
'allmessages' => 'See All Messages',
'notifications' => 'You have 10 notifications',
'newmembers' => '5 new members joined today',
'viewall' => 'View all',
'tasks' => 'You have 9 tasks',
'alltasks' => 'View all tasks',
'desbuttons' => 'Design some buttons',
'complete' => 'Complete',
'membersince' => 'Member since',
'followers' => 'Followers',
'sales' => 'Sales',
'friends' => 'Friends',
'profile' => 'Profile',
'signout' => 'Sign out',
'landingdescription' => 'Laravel 5 package that switchs default Laravel scaffolding/boilerplate to AdminLTE template with Bootstrap 3.0 and Pratt Landing page',
'landingdescriptionpratt' => 'Acacha AdminLTE Laravel package template Landing page - Using Pratt',
'description' => 'Description',
'showcase' => 'Showcase',
'contact' => 'Contact',
'laravelpackage' => '5 package that switchs default Laravel',
'to' => 'to',
'templatewith' => 'template with',
'and' => 'and',
'gedstarted' => 'Get Started!',
'amazing' => 'Amazing admin template',
'basedadminlte' => 'Based on adminlte bootstrap theme',
'awesomepackaged' => 'Awesome packaged...',
'by' => 'by',
'at' => 'at',
'readytouse' => 'ready to use with Laravel!',
'designed' => 'Designed To Excel',
'community' => 'Community',
'see' => 'See',
'githubproject' => 'Github project',
'post' => 'post',
'issues' => 'issues',
'pullrequests' => 'Pull requests',
'schedule' => 'Schedule',
'monitoring' => 'Monitoring',
'whatnew' => 'What\'s New?',
'features' => 'Some Features',
'design' => 'First Class Design',
'retina' => 'Retina Ready Theme',
'support' => 'Awesome Support',
'responsive' => 'Responsive Design',
'screenshots' => 'Some Screenshots',
'address' => 'Address',
'dropus' => 'Drop Us A Line',
'yourname' => 'Your Name',
'emailaddress' => 'Email Address',
'enteremail' => 'Enter Email',
'yourtext' => 'Your Text',
'submit' => 'SUBMIT',
'email' => 'Email',
'username' => 'Username',
'password' => 'Password',
'retypepassword' => 'Retype password',
'fullname' => 'Full Name',
'registererror' => 'Error registering!',
'loginerror' => 'Error loging!',
'loggedin' => 'Logged in!',
'entering' => 'Entering...',
'registered' => 'User Registered!',
];