Enabled password reset forms

This commit is contained in:
Deon George 2020-01-22 20:48:42 +11:00
parent 62f66d7eed
commit 176f680ff7
3 changed files with 109 additions and 64 deletions

View File

@ -79,12 +79,12 @@
@endif
<p class="mb-1">
<a name="reset" href="{{ url('/password/reset') }}">{{ trans('adminlte_lang::message.forgotpassword') }}</a>
<a name="reset" href="{{ url('password/reset') }}">{{ trans('adminlte_lang::message.forgotpassword') }}</a>
</p>
@isset($register)
<p class="mb-0">
<a href="register.html" class="text-center">Register a new membership</a>
<a href="{{ url('register') }}" class="text-center">{{ trans('adminlte_lang::message.register') }}</a>
</p>
@endisset
</div>

View File

@ -5,16 +5,16 @@
@endsection
@section('content')
<body class="hold-transition login-page">
<div id="app" v-cloak>
<div class="login-box">
<div class="login-box m-auto">
<div class="login-logo">
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
</div><!-- /.login-logo -->
<a>{!! config('app.name_html_long') !!}</a>
</div>
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
@if (Session::has('status'))
<div class="text-center mb-3">
<div class="alert alert-success m-auto">
<strong>OK!</strong> {{ Session::get('status') }}
</div>
</div>
@endif
@ -29,17 +29,39 @@
</div>
@endif
<div class="login-box-body">
<p class="login-box-msg">{{ trans('adminlte_lang::message.passwordreset') }}</p>
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">You forgot your password? Here you can easily retrieve a new password.</p>
<email-reset-password-form></email-reset-password-form>
<a href="{{ url('/login') }}">Log in</a><br>
</div><!-- /.login-box-body -->
</div><!-- /.login-box -->
<form method="post" action="{{ url('password/email') }}">
{{ csrf_field() }}
<div class="input-group mb-3">
<input type="email" name="email" class="form-control" placeholder="Email" required>
<div class="input-group-append">
<span class="fa fa-envelope input-group-text"></span>
</div>
</div>
<div class="row">
<div class="col-12">
<button type="submit" class="btn btn-primary btn-block">{{ trans('adminlte_lang::message.sendpassword') }}</button>
</div>
<!-- /.col -->
</div>
</form>
@include('adminlte::layouts.partials.scripts_auth')
</body>
<p class="mt-3 mb-1">
<a href="{{ url('login') }}">{{ trans('adminlte_lang::message.login') }}</a>
</p>
@isset($register)
<p class="mb-0">
<a href="{{ url('register') }}" class="text-center">{{ trans('adminlte_lang::message.register') }}</a>
</p>
@endisset
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
@endsection

View File

@ -5,18 +5,10 @@
@endsection
@section('content')
<body class="hold-transition login-page">
<div id="app" v-cloak>
<div class="login-box">
<div class="login-box m-auto">
<div class="login-logo">
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
</div><!-- /.login-logo -->
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
<a>{!! config('app.name_html_long') !!}</a>
</div>
@endif
@if (count($errors) > 0)
<div class="alert alert-danger">
@ -29,18 +21,49 @@
</div>
@endif
<div class="login-box-body">
<p class="login-box-msg">{{ trans('adminlte_lang::message.passwordreset') }}</p>
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">You are only one step a way from your new password, set your new password now.</p>
<reset-password-form token="{{ $token }}">></reset-password-form>
<a href="{{ url('/login') }}">Log in</a><br>
<a href="{{ url('/register') }}" class="text-center">{{ trans('adminlte_lang::message.register') }}</a>
</div><!-- /.login-box-body -->
</div><!-- /.login-box -->
<form method="post" action="{{ url('password/reset') }}">
{{ csrf_field() }}
<div class="input-group mb-3">
<input type="email" name="email" class="form-control" placeholder="Email" required>
<div class="input-group-append">
<span class="fa fa-envelope input-group-text"></span>
</div>
</div>
<div class="input-group mb-3">
<input type="password" name="password" class="form-control" placeholder="Password" required>
<div class="input-group-append">
<span class="fa fa-lock input-group-text"></span>
</div>
</div>
<div class="input-group mb-3">
<input type="password" name="password_confirmation" class="form-control" placeholder="Confirm Password" data-match="#password" required>
<div class="input-group-append">
<span class="fa fa-lock input-group-text"></span>
</div>
</div>
<div class="row">
<div class="col-12">
<button type="submit" class="btn btn-primary btn-block">{{ trans('adminlte_lang::message.passwordreset') }}</button>
</div>
<!-- /.col -->
</div>
<input type="hidden" name="token" value="{{ $token }}">
</form>
@include('adminlte::layouts.partials.scripts_auth')
</body>
<p class="mt-3 mb-1">
<a href="{{ url('login') }}">Login</a>
@isset($register)
<a href="{{ url('register') }}" class="text-center">{{ trans('adminlte_lang::message.register') }}</a>
@endisset
</p>
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
@endsection