<!-- Modal -->
<div class="modal" id="addRcModal" data-keyboard="false" data-backdrop="static">
    <div class="modal-dialog modal-lg" style="max-width: 500px">
        <div class="modal-content border-primary">
            <div class="modal-header bg-primary">
                <h5 class="modal-title text-white">Add Related Contact</h5>
                <button type="button" class="close text-white" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <form method="post" action="{{route('updateContact', $contact->id)}}" data-toggle="validator"
                      autocomplete="off" class="form-styled">
                    @csrf
                    <input type="hidden" name="type" value="rc">
                    <div class="row">
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group has-feedback">
                                <label class="control-label">Relationships to the contact*</label>
                                <select required name="relation" class="form-control">
                                    <option value="">Select Relationship</option>
                                    <option value="Child">
                                        Child
                                    </option>
                                    <option value="Co-Worker">
                                        Co-Worker
                                    </option>
                                    <option value="Employee">
                                        Employee
                                    </option>
                                    <option value="Employee (Director)">
                                        Employee (Director)
                                    </option>
                                    <option value="Employer">
                                        Employer
                                    </option>
                                    <option value="Employer (Director)">
                                        Employer (Director)
                                    </option>
                                    <option value="Sibling">
                                        Sibling
                                    </option>
                                    <option value="Spouse">
                                        Spouse
                                    </option>
                                    <option value="Sub Company">
                                        Sub Company
                                    </option>
                                    <option value="Other">
                                        Other
                                    </option>
                                </select>
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group">
                                <label class="control-label">Contact*</label>
                                <select required name="related_contact_id"
                                        class="form-control">
                                    <option value="">Select Contact</option>
                                    @foreach (auth()->user()->contacts()->where('id', '!=', $contact->id)->orderBy('name')->get() as $attr)
                                        <option value="{{ $attr->id }}">
                                            {{ $attr->name }}
                                        </option>
                                    @endforeach
                                </select>
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group">
                                <button type="submit" name="submit" class="btn btn-success"><i
                                        class="fa fa-check fa-lg"> </i>&nbsp;Submit
                                </button>
                                <button type="button" class="btn btn-secondary" data-dismiss="modal"><i
                                        class="fa fa-times fa-lg"></i> Close
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
