<!-- Modal -->
<div class="modal" id="addAgentModal" 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 Agent</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 id="create_agent_form" class="form-styled" data-toggle="validator"
                      action="<?php echo e(route('create-agent')); ?>" method="POST" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="row">
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label>Full Name*</label>
                                <input type="text" name="agent_name" maxlength="30" required
                                       data-minlength="3" data-error="Must be at least 3 characters"
                                       class="form-control"><span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <?php if(auth()->user()->type == 1): ?>
                            <div class="col-xs-12 col-lg-6">
                                <div class="form-group has-feedback">
                                    <label>Agency (Optional)</label>
                                    <select name="agent_agency" class="form-control">
                                        <option value="">Select Agency</option>
                                        <?php $__currentLoopData = App\Models\User::where('type', 2)->get(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($user->id); ?>"><?php echo e($user->name); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>
                        <?php endif; ?>
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label>Email*</label>
                                <input type="email" name="agent_email" maxlength="30" required
                                       data-minlength="3"
                                       data-error="Email is required"
                                       class="form-control"><span aria-hidden="true"></span><span
                                    class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label>Phone* (+971 XX XXXXXXX)</label>
                                <input type="text" name="agent_phone" maxlength="20" required
                                       data-minlength="3" data-error="Must be at least 3 characters"
                                       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>Emirates ID - Front*</label>
                                <input style="padding: 3px" required type="file" class="form-control"
                                       name="agent_emirates_id_front">
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label>Emirates ID - Back*</label>
                                <input style="padding: 3px" required type="file" class="form-control"
                                       name="agent_emirates_id_back">
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label>Copy of Passport*</label>
                                <input required type="file" style="padding: 3px" class="form-control"
                                       name="agent_copy_of_passport">
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-6">
                            <div class="form-group has-feedback">
                                <label>Copy of Visa*</label>
                                <input required type="file" style="padding: 3px" class="form-control"
                                       name="agent_copy_of_visa">
                                <span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-6">
                            <label>Password*</label>
                            <div class="form-group has-feedback">
                                <input type="password" id="agent_password" name="agent_password"
                                       data-minlength="6" required
                                       maxlength="20"
                                       data-error="Must be at least 6 characters"
                                       class="form-control"><span class="help-block with-errors"></span>
                            </div>
                        </div>
                        <div class="col-xs-12 col-lg-6">
                            <label>Confirm Password*</label>
                            <div class="form-group has-feedback">
                                <input type="password" name="agent_password_confirmation" required
                                       minlength="6"
                                       maxlength="20"
                                       data-match="#agent_password"
                                       data-match-error="Password must be same"
                                       data-error="Password must be same"
                                       class="form-control input-shadow">
                                <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 text-right">
                                <button type="submit"
                                        class="btn btn-success">
                                    <i class="fa fa-check fa-lg"></i> Save
                                </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>
<?php /**PATH E:\xampp\htdocs\propco\resources\views/admin/agents/modals/addAgentModal.blade.php ENDPATH**/ ?>