@extends('layouts.app')
@section('contentSection')
    <main class="site-main">
        <div class="columns container">
            <ol class="breadcrumb no-hide">
                <li><a href="/">Home </a></li>
                <li class="active">Reset Password</li>
            </ol>
        </div>
        <section class="mt-5 about">
            <div class="container">
                <div class="row">
                    <div class="col-lg-4"></div>
                    <div class="col-lg-4">
                        <form action="{{route('doRP')}}" method="POST">
                            @csrf
                            <input type="hidden" value="{{Illuminate\Support\Str::afterLast(url()->current(), '/')}}"
                                   name="token">
                            @csrf
                            <div class="form-group">
                                <label>New Password *</label>
                                <input class="form-control" type="password" name="password" required minlength="6"
                                       maxlength="20">
                            </div>
                            <div class="form-group">
                                <label>Confirm New Password *</label>
                                <input class="form-control" type="password" name="password_confirmation" required
                                       maxlength="20">
                            </div>
                            <button class="btn btn-primary" type="submit">Reset Password</button>
                            <br>
                            <br>
                        </form>
                    </div>
                    <div class="col-lg-4"></div>
                </div>
            </div>
        </section>
    </main>
@endsection
@section('pageSpecificScripts')
    <script src="{{ asset('assets/js/sweetalert2.all.js') }}"></script>
    @if (Session::has('success'))
        <script type="text/javascript">
            Swal.fire({
                icon: 'success',
                text: "{{Session::get('success')}}",
            });
        </script>
    @endif
    @if (Session::has('errors'))
        <script type="text/javascript">
            Swal.fire({
                icon: 'error',
                html: "<ul style='list-style: none'>@foreach(Session::get('errors') as $error) <li>{{$error}}</li> @endforeach</ul>",
            });
        </script>
    @endif
@endsection
