<?php $__env->startSection('page_title'); ?>
    <?php echo e(__('admin::app.settings.users.create-title')); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('content-wrapper'); ?>
    <div class="content full-page adjacent-center">
        <?php echo view_render_event('admin.settings.users.create.header.before'); ?>


        <div class="page-header">
            
            <?php echo e(Breadcrumbs::render('settings.users.create')); ?>


            <div class="page-title">
                <h1><?php echo e(__('admin::app.settings.users.create-title')); ?></h1>
            </div>
        </div>

        <?php echo view_render_event('admin.settings.users.create.header.after'); ?>


        <form method="POST" action="<?php echo e(route('admin.settings.users.store')); ?>" @submit.prevent="onSubmit">
            <div class="page-content">
                <div class="form-container">

                    <div class="panel">
                        <div class="panel-header">
                            <?php echo view_render_event('admin.settings.users.create.form_buttons.before'); ?>


                            <button type="submit" class="btn btn-md btn-primary">
                                <?php echo e(__('admin::app.settings.users.save-btn-title')); ?>

                            </button>

                            <a href="<?php echo e(route('admin.settings.users.index')); ?>">
                                <?php echo e(__('admin::app.settings.users.back')); ?>

                            </a>

                            <?php echo view_render_event('admin.settings.users.create.form_buttons.after'); ?>

                        </div>

                        <tabs>
                            <tab name="<?php echo e(__('admin::app.settings.users.general')); ?>" :selected="true">
                                <?php echo view_render_event('admin.settings.users.create.form_controls.general.before'); ?>


                                <?php echo csrf_field(); ?>
                                
                                <div class="form-group" :class="[errors.has('name') ? 'has-error' : '']">
                                    <label class="required">
                                        <?php echo e(__('admin::app.settings.users.name')); ?>

                                    </label>

                                    <input
                                        type="text"
                                        name="name"
                                        class="control"
                                        value="<?php echo e(old('name')); ?>"
                                        placeholder="<?php echo e(__('admin::app.settings.users.name')); ?>"
                                        v-validate="'required'"
                                        data-vv-as="<?php echo e(__('admin::app.settings.users.name')); ?>"
                                    />

                                    <span class="control-error" v-if="errors.has('name')">
                                        {{ errors.first('name') }}
                                    </span>
                                </div>

                                <div class="form-group" :class="[errors.has('email') ? 'has-error' : '']">
                                    <label class="required">
                                        <?php echo e(__('admin::app.settings.users.email')); ?>

                                    </label>

                                    <input
                                        type="email"
                                        name="email"
                                        class="control"
                                        value="<?php echo e(old('email')); ?>"
                                        placeholder="<?php echo e(__('admin::app.settings.users.email')); ?>"
                                        v-validate="'required|email'"
                                        data-vv-as="<?php echo e(__('admin::app.settings.users.email')); ?>"
                                    />

                                    <span class="control-error" v-if="errors.has('email')">
                                        {{ errors.first('email') }}
                                    </span>
                                </div>

                                <div class="form-group">
                                    <label class="required">
                                        <?php echo e(__('admin::app.settings.users.status')); ?>

                                    </label>

                                    <label class="switch">
                                        <input
                                            type="checkbox"
                                            name="status"
                                            class="control"
                                            id="status"
                                            <?php echo e(old('status') ? 'checked' : ''); ?>

                                        />
                                        <span class="slider round"></span>
                                    </label>
                                </div>

                                <div class="form-group" :class="[errors.has('password') ? 'has-error' : '']">
                                    <label class="required">
                                        <?php echo e(__('admin::app.settings.users.password')); ?>

                                    </label>
    
                                    <input
                                        type="password"
                                        name="password"
                                        class="control"
                                        ref="password"
                                        placeholder="<?php echo e(__('admin::app.settings.users.password')); ?>"
                                        v-validate="'required|min:6'"
                                        data-vv-as="<?php echo e(__('admin::app.settings.users.password')); ?>"
                                    />
    
                                    <span class="control-error" v-if="errors.has('password')">
                                        {{ errors.first('password') }}
                                    </span>
                                </div>
    
                                <div class="form-group" :class="[errors.has('confirm_password') ? 'has-error' : '']">
                                    <label class="required">
                                        <?php echo e(__('admin::app.settings.users.confirm_password')); ?>

                                    </label>
    
                                    <input
                                        type="password"
                                        class="control"
                                        name="confirm_password"
                                        placeholder="<?php echo e(__('admin::app.settings.users.confirm_password')); ?>"
                                        v-validate="'required|confirmed:password'"
                                        data-vv-as="<?php echo e(__('admin::app.settings.users.confirm_password')); ?>"
                                    />
    
                                    <span class="control-error" v-if="errors.has('confirm_password')">
                                        {{ errors.first('confirm_password') }}
                                    </span>
                                </div>

                                <?php echo view_render_event('admin.settings.users.create.form_controls.general.after'); ?>

                            </tab>
    
                            <tab name="<?php echo e(__('admin::app.settings.users.permission')); ?>">
                                <?php echo view_render_event('admin.settings.users.create.form_controls.permission.before'); ?>


                                <div class="form-group">
                                    <label>
                                        <?php echo e(__('admin::app.settings.users.groups')); ?>

                                    </label>

                                    <select name="groups[]" class="control" multiple>
                                        <?php $__currentLoopData = $groups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($group->id); ?>" <?php echo e(old('groups') && in_array($group->id, old('groups')) ? 'selected' : ''); ?>>
                                                <?php echo e($group->name); ?>

                                            </option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>

                                <div class="form-group" :class="[errors.has('role') ? 'has-error' : '']">
                                    <label>
                                        <?php echo e(__('admin::app.settings.users.role')); ?>

                                    </label>
    
                                    <select
                                        name="role_id"
                                        class="control"
                                        data-vv-as="<?php echo e(__('admin::app.settings.users.role')); ?>"
                                        v-validate="'required'"
                                    >
                                        <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option value="<?php echo e($role->id); ?>" <?php echo e(old('role_id') == $role->id ? 'selected' : ''); ?>>
                                                <?php echo e($role->name); ?>

                                            </option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
    
                                    <span class="control-error" v-if="errors.has('role_id')">
                                        {{ errors.first('role_id') }}
                                    </span>
                                </div>
    
                                <div class="form-group" :class="[errors.has('view_permission') ? 'has-error' : '']">
                                    <label>
                                        <?php echo e(__('admin::app.settings.users.view-permission')); ?>

                                    </label>
    
                                    <select
                                        name="view_permission"
                                        class="control"
                                        v-validate="'required'"
                                        data-vv-as="<?php echo e(__('admin::app.settings.users.view-permission')); ?>"
                                    >
                                        <option value="global" <?php echo e(old('view_permission') == 'global' ? 'selected' : ''); ?>>
                                            <?php echo e(__('admin::app.settings.users.global')); ?>

                                        </option>

                                        <option value="group" <?php echo e(old('view_permission') == 'group' ? 'selected' : ''); ?>>
                                            <?php echo e(__('admin::app.settings.users.group')); ?>

                                        </option>

                                        <option value="individual" <?php echo e(old('view_permission') == 'individual' ? 'selected' : ''); ?>>
                                            <?php echo e(__('admin::app.settings.users.individual')); ?>

                                        </option>
                                    </select>
    
                                    <span class="control-error" v-if="errors.has('view_permission')">
                                        {{ errors.first('view_permission') }}
                                    </span>
                                </div>

                                <?php echo view_render_event('admin.settings.users.create.form_controls.permission.after'); ?>

                            </tab>
                        </tabs>
                    </div>
                    
                </div>
            </div>
        </form>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin::layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/quikappspane/public_html/cmr.quik-apps.com.co/laravel-crm/packages/Webkul/Admin/src/Providers/../Resources/views/settings/users/create.blade.php ENDPATH**/ ?>