<!-- Modal -->
<div class="modal" id="addContactModal" 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 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 data-toggle="validator" autocomplete="off" class="form-styled" id="create_contact_form">
                    <?php echo csrf_field(); ?>
                    <div class="row">
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group has-feedback">
                                <label class="control-label">Type of contact*</label>
                                <select id="contact_type" required class="form-control">
                                    <option value="1">Individual</option>
                                    <option value="2">Company</option>
                                </select>
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12" id="cSalutation">
                            <div class="form-group has-feedback">
                                <label class="control-label">Title</label>
                                <select id="contact_salutation" class="form-control">
                                    <option value="">Select an option</option>
                                    <option value="Mr">Mr</option>
                                    <option value="Ms">Ms</option>
                                    <option value="M/S">M/S</option>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group has-feedback">
                                <label class="control-label" id="cName">Name*</label>
                                <input type="text" id="contact_name" maxlength="50" required data-minlength="1"
                                       data-error="Must be at least 3 character" class="form-control"><span
                                    class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group has-feedback">
                                <label class="control-label" id="cPhone">Phone</label>
                                <input type="text" id="contact_phone" maxlength="20" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group has-feedback">
                                <label class="control-label" id="cAltPhone">Alternate Phone</label>
                                <input type="text" id="contact_alt_phone" maxlength="20" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group has-feedback">
                                <label class="control-label" id="cEmail">Email</label>
                                <input type="text" id="contact_email" maxlength="50" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12" id="cBrn">
                            <div class="form-group has-feedback">
                                <label class="control-label">BRN</label>
                                <input type="text" id="contact_brn" maxlength="20" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12" style="display: none" id="cOrn">
                            <div class="form-group has-feedback">
                                <label class="control-label">RERA ORN</label>
                                <input type="text" id="contact_orn" maxlength="20" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12" style="display: none" id="cTln">
                            <div class="form-group has-feedback">
                                <label class="control-label">Trade Licence</label>
                                <input type="text" id="contact_tln" maxlength="20" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12" style="display: none" id="cAddress">
                            <div class="form-group has-feedback">
                                <label class="control-label">Address</label>
                                <input type="text" id="contact_address" maxlength="200" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12" id="cUrl" style="display: none">
                            <div class="form-group has-feedback">
                                <label class="control-label">Company Url</label>
                                <input type="text" id="contact_website" maxlength="100" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12">
                            <div class="form-group">
                                <label class="control-label">Lead Source</label>
                                <select data-live-search="true" id="contact_source"
                                        class="form-control selectpicker show-tick">
                                    <option value="">Select Lead Source</option>
                                    <?php $__currentLoopData = App\Models\Attribute::orderBy('name')->where('type', 'leadSource')->whereNull('is_primary')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $attr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($attr->id); ?>">
                                            <?php echo e($attr->name); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-12" id="cContactRole">
                            <div class="form-group">
                                <label class="control-label">Contact Role</label>
                                <select data-live-search="true" id="contact_role"
                                        class="form-control selectpicker show-tick">
                                    <option value="">Select Contact Role</option>
                                    <?php $__currentLoopData = App\Models\Attribute::orderBy('name')->where('type', 'contactRole')->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $attr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($attr->id); ?>">
                                            <?php echo e($attr->name); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        </div>
                        <?php if(auth()->user()->type == 1 || auth()->user()->type == 2): ?>
                            <div class="col-xs-12 col-lg-12">
                                <div class="form-group">
                                    <label class="control-label">Assign To</label>
                                    <select data-live-search="true" id="contact_assign_to"
                                            class="form-control selectpicker show-tick">
                                        <option value="">Select User</option>
                                        <?php if(auth()->user()->type == 1): ?>
                                            <?php $__currentLoopData = App\Models\User::orderBy('name')->where('type', 3)->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $attr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($attr->id); ?>">
                                                    <?php echo e($attr->name); ?>

                                                </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php else: ?>
                                            <?php $__currentLoopData = App\Models\User::orderBy('name')->where('parent_id', auth()->id())->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $attr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($attr->id); ?>">
                                                    <?php echo e($attr->name); ?>

                                                </option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        <?php endif; ?>
                                    </select>
                                </div>
                            </div>
                        <?php endif; ?>
                    </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>
<?php /**PATH E:\xampp\htdocs\propco\resources\views/admin/contacts/modals/addContactModal.blade.php ENDPATH**/ ?>