<!-- Modal -->
<div class="modal" id="addOffplanModal" data-keyboard="false" data-backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content border-primary">
            <div class="modal-header bg-primary">
                <h5 class="modal-title text-white">Add new</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 data-toggle="validator" autocomplete="off" method="post"
                      class="form-styled" id="create_offplan_form">
                    @csrf
                    <div class="row">
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Project*</label>
                                <select required data-live-search="true" id="offplan_project"
                                        class="form-control selectpicker show-tick">
                                    <option value="">Select Project</option>
                                </select>
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Developer*</label>
                                <select required data-live-search="true" id="offplan_developer"
                                        class="form-control selectpicker show-tick">
                                    <option value="">Select Developer</option>
                                    @foreach (App\Models\Attribute::where('type', 'developer')->get() as $attr)
                                        <option value="{{ $attr->id }}">{{ $attr->name }}</option>
                                    @endforeach
                                </select>
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Unit type</label>
                                <select data-live-search="true" id="offplan_unit_type"
                                        class="form-control selectpicker show-tick">
                                    <option value="">Select Unit type</option>
                                    @foreach (App\Models\Attribute::where('type', 'unitType')->get() as $attr)
                                        <option value="{{ $attr->id }}">{{ $attr->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Development status</label>
                                <select data-live-search="true" id="offplan_development_status"
                                        class="form-control selectpicker show-tick">
                                    <option value="">Select Development status</option>
                                    @foreach (App\Models\Attribute::where('type', 'developmentStatus')->get() as $attr)
                                        <option value="{{ $attr->id }}">{{ $attr->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Sale status</label>
                                <select data-live-search="true" id="offplan_sale_status"
                                        class="form-control selectpicker show-tick">
                                    <option value="">Select Sale status</option>
                                    @foreach (App\Models\Attribute::where('type', 'saleStatus')->get() as $attr)
                                        <option value="{{ $attr->id }}">{{ $attr->name }}</option>
                                    @endforeach
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Unit Number</label>
                                <input type="text" maxlength="20" id="offplan_unit_no" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Floor</label>
                                <input type="text" maxlength="20" id="offplan_floor" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">View</label>
                                <input type="text" maxlength="100" id="offplan_view" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Price</label>
                                <input type="text" maxlength="20" id="offplan_price" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Area</label>
                                <input type="text" maxlength="10" id="offplan_area" class="form-control">
                            </div>
                        </div> <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Unit Area</label>
                                <input type="text" maxlength="10" id="offplan_unit_area" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Beds</label>
                                <input type="text" maxlength="20" id="offplan_beds" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Parking</label>
                                <select id="offplan_parking" class="form-control">
                                    <option value="Yes">Yes</option>
                                    <option value="NO">No</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-4">
                            <div class="form-group">
                                <label class="control-label">Completion Date</label>
                                <input type="text" maxlength="20" id="offplan_cd" class="form-control">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group">
                                <button type="submit" id="submit_btn" 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 class="alert alert-danger add_errors" style="display: none">
                                    <ul></ul>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
