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 @endif
<p class="mb-1"> <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> </p>
@isset($register) @isset($register)
<p class="mb-0"> <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> </p>
@endisset @endisset
</div> </div>

View File

@ -5,41 +5,63 @@
@endsection @endsection
@section('content') @section('content')
<body class="hold-transition login-page"> <div class="login-box m-auto">
<div id="app" v-cloak> <div class="login-logo">
<div class="login-box"> <a>{!! config('app.name_html_long') !!}</a>
<div class="login-logo"> </div>
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
</div><!-- /.login-logo -->
@if (session('status')) @if (Session::has('status'))
<div class="alert alert-success"> <div class="text-center mb-3">
{{ session('status') }} <div class="alert alert-success m-auto">
<strong>OK!</strong> {{ Session::get('status') }}
</div> </div>
@endif </div>
@endif
@if (count($errors) > 0) @if (count($errors) > 0)
<div class="alert alert-danger"> <div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br> <strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul> <ul>
@foreach ($errors->all() as $error) @foreach ($errors->all() as $error)
<li>{{ $error }}</li> <li>{{ $error }}</li>
@endforeach @endforeach
</ul> </ul>
</div> </div>
@endif @endif
<div class="login-box-body"> <!-- /.login-logo -->
<p class="login-box-msg">{{ trans('adminlte_lang::message.passwordreset') }}</p> <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> <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>
<a href="{{ url('/login') }}">Log in</a><br> <p class="mt-3 mb-1">
</div><!-- /.login-box-body --> <a href="{{ url('login') }}">{{ trans('adminlte_lang::message.login') }}</a>
</p>
</div><!-- /.login-box --> @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> </div>
<!-- /.login-box -->
@include('adminlte::layouts.partials.scripts_auth')
</body>
@endsection @endsection

View File

@ -5,42 +5,65 @@
@endsection @endsection
@section('content') @section('content')
<body class="hold-transition login-page"> <div class="login-box m-auto">
<div id="app" v-cloak> <div class="login-logo">
<div class="login-box"> <a>{!! config('app.name_html_long') !!}</a>
<div class="login-logo"> </div>
<a href="{{ url('/home') }}">{!! config('app.name_html_long') !!}</a>
</div><!-- /.login-logo -->
@if (session('status')) @if (count($errors) > 0)
<div class="alert alert-success"> <div class="alert alert-danger">
{{ session('status') }} <strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
</div> <ul>
@endif @foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if (count($errors) > 0) <!-- /.login-logo -->
<div class="alert alert-danger"> <div class="card">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br> <div class="card-body login-card-body">
<ul> <p class="login-box-msg">You are only one step a way from your new password, set your new password now.</p>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<div class="login-box-body"> <form method="post" action="{{ url('password/reset') }}">
<p class="login-box-msg">{{ trans('adminlte_lang::message.passwordreset') }}</p> {{ 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>
<reset-password-form token="{{ $token }}">></reset-password-form> <p class="mt-3 mb-1">
<a href="{{ url('login') }}">Login</a>
<a href="{{ url('/login') }}">Log in</a><br> @isset($register)
<a href="{{ url('/register') }}" class="text-center">{{ trans('adminlte_lang::message.register') }}</a> <a href="{{ url('register') }}" class="text-center">{{ trans('adminlte_lang::message.register') }}</a>
</div><!-- /.login-box-body --> @endisset
</p>
</div><!-- /.login-box --> </div>
<!-- /.login-card-body -->
</div>
</div> </div>
<!-- /.login-box -->
@include('adminlte::layouts.partials.scripts_auth')
</body>
@endsection @endsection