@extends('layouts.admin') @section('content')
<div class="row mb-3">
    <div class="col-10">
        <div class="card mb-3">
            <div class="card-header">
                <div class="row flex-between-end">
                    <div class="col-auto align-self-center">
                        <h5 class="mb-0" data-anchor="data-anchor">Delete member</h5>
                    </div>
                </div>
            </div>
            <div class="card-body bg-light">
                <form class="form-material" method="POST" action="{{ url ('/delete_member')}}">
                    @csrf
                    @if(count($errors->all()))
                    @foreach ($errors->all() as $error)
                    <div class="alert alert-danger alert-dismissable"> <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a> <strong>Alert!</strong> {{ $error }} </div> @endforeach @endif
                    <div class="row">
                        <p>Note that all information related to this member will be deleted, include, payment, dependants,
                            beneficiaries, arears, cover and primium. To confirm please put your email and password.
                        </p>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                            <input hidden type="text" name="member_id" value="{{$member->id}}">
                            <input type="email" required class="form-control" id="email" name="email" value="" placeholder="Enter your email">
                        </div>
                        <div class="col-sm-6">
                            <input type="password" required class="form-control" id="password" name="password" value="" placeholder="Password">
                            <br>
                        </div>
                    </div>
                    <div class="text-center">
                        <br><button type="submit" class="btn btn-primary btn-sm"><i class="far fa-save"></i> Save</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


@endsection