<!-- Modal -->
<div class="modal" id="addAttributeModal">
    <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 Attribute</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" class="form-styled" id="create_attribute_form">
                    @csrf
                    <div class="row">
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label for="attr_name" class="control-label">Name*</label>
                                <input type="text" id="attr_name" maxlength="30" required placeholder="Enter name"
                                       data-minlength="1" data-error="Must be at least 1 character"
                                       class="form-control"><span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label for="attr_parent" class="control-label">Parent</label>
                                <select id="attr_parent" class="form-control">
                                    <option value="">Select Parent</option>
                                    @foreach(getAttributes() as $attr)
                                        <option value="{{$attr->id}}">{{$attr->name}}</option>
                                    @endforeach
                                </select>
                            </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>
