@extends('admin.layout.layout')
@section('title', 'Change Password')
@section('content')
    <div class="container-xxl flex-grow-1 container-p-y">
        <h4 class="fw-bold py-3 mb-4">Change Password</h4>
        <div class="col-xl-12">
            @if(Session::has('success'))
                <div class="alert alert-success text-center"><span class="glyphicon glyphicon-ok"></span><em> {!! session('success') !!}</em></div>
            @endif
            <form action="{{route('admin.updateAdminPassword')}}" method="POST">
                @csrf
                <div class="card mb-4">
                    <div class="card-body">

                        <div class="mb-3 row">
                            <label for="html5-password-input" class="col-md-2 col-form-label">Current Password</label>
                            <div class="col-md-10">
                                <input type="password" name="current_password" class="form-control @error('current_password') is-invalid @enderror"
                                       placeholder="Current Password" required>
                                @error('current_password')
                                <span class="invalid-feedback" role="alert"><strong>{{$message}}</strong></span>
                                @enderror
                            </div>
                        </div>

                        <div class="mb-3 row">
                            <label for="html5-password-input" class="col-md-2 col-form-label">New Password</label>
                            <div class="col-md-10">
                                <input type="password" name="password" class="form-control @error('password') is-invalid @enderror"
                                       placeholder="New Password" required />
                                @error('password')
                                <span class="invalid-feedback" role="alert"><strong>{{$message}}</strong></span>
                                @enderror
                            </div>
                        </div>

                        <div class="mb-3 row">
                            <label for="html5-password-input" class="col-md-2 col-form-label">Confirm Password</label>
                            <div class="col-md-10">
                                <input type="password" name="password_confirmation" class="form-control"
                                       placeholder="Confirm Password"
                                       required />
                            </div>
                        </div>
                        <div class="text-center">
                            <button type="submit" class="btn btn-md btn-primary">Submit</button>
                        </div>
                    </div>
                </div>
            </form>

        </div>
    </div>
@endsection
