<!-- source: https://quickadminpanel.com/blog/laravel-login-and-register-forms-in-modal-bootstrap-popups/-->
<div class="modal fade" id="popupModal" tabindex="-1" role="dialog" aria-labelledby="popupModal" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="popupModal">{{ __('Edit Profile') }}</h5> <!-- id to indentify the popup!!!-->
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">
                <!-- (Image upload) Start -->
                @if ($message = Session::get('success'))
                <div class="alert alert-success alert-block">
                    <button type="button" class="close" data-dismiss="alert">×</button>
                        <strong>{{ $message }}</strong>
                </div>
                @endif

                @if (count($errors) > 0)
                    <div class="alert alert-danger">
                        <strong>Whoops!</strong> There were some problems with your input.
                        <ul>
                            @foreach ($errors->all() as $error)
                                <li>{{ $error }}</li>
                            @endforeach
                        </ul>
                    </div>
                @endif
                <!-- (Image upload) Start -->
                <form action="{{ route('modal.upload.post') }}" method="POST" enctype="multipart/form-data">
                    @csrf
                    <div class="row">
                        <div class="col-md-6">
                            <input type="file" name="image" class="form-control-file">
                        </div>
                    </div>
                    <br>
                    <div class="row">
                        <div class="col">
                            <p>Change Bio</p>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col">
                           <input type="text" style="color:black" name="bio" class="form-control">
                        </div>
                    </div>
                    <br>
                    <div class="col-md-6">
                        <button type="submit" class="btn btn-success">Update</button>
                    </div>
                </form>
                <!-- (Image upload) End -->
            </div>
        </div>
    </div>
</div>
