<?php $__env->startSection('title', 'Create User'); ?>
<?php $__env->startSection('content'); ?>

    <div class="row">
        <div class="widget">
            <div class="widget-header"> <i class="icon-plus"></i>
                <h3>Create New User</h3>
            </div>
            <!-- /widget-header -->
            <div class="widget-content">
                <div class="span6">
                <form method="POST" action="<?php echo e(route('users.store')); ?>" accept-charset="UTF-8" class="form-horizontal" id="formapp">
                    <fieldset>
                        <?php echo csrf_field(); ?>
                        <div class="control-group">
                            <label class="control-label asterisk" for="firstname">Name:</label>
                            <div class="controls">
                                <input class="span3" name="name" type="text" id="name" required placeholder="User Name
"><?php if($errors->has('name')): ?>
                                    <span class="text-danger"><?php echo e($errors->first('name')); ?></span>
                                <?php endif; ?>                            </div> <!-- /controls -->
                        </div> <!-- /control-group -->

                        <div class="control-group">
                            <label class="control-label asterisk" for="firstname">Email:</label>
                            <div class="controls">
                                <input class="span3" name="email" type="text" id="email" required placeholder="User Email
"><?php if($errors->has('email')): ?>
                                    <span class="text-danger"><?php echo e($errors->first('email')); ?></span>
                                <?php endif; ?>
                            </div> <!-- /controls -->
                        </div> <!-- /control-group -->

                        <div class="control-group">
                            <label class="control-label asterisk" for="firstname">Password:</label>
                            <div class="controls">
                                <input class="span3" id="password" type="password" name="password" required value="Support@123" placeholder="User password
"> <input type="checkbox" onclick="myFunction()">                              <?php if($errors->has('password')): ?>
                                    <span class="text-danger"><?php echo e($errors->first('password')); ?></span>
                                <?php endif; ?>                            </div> <!-- /controls -->
                        </div> <!-- /control-group -->
                        <div class="control-group">
                            <label class="control-label asterisk" for="firstname">Role:</label>
                            <div class="controls">
                                <select name="role_id" class="span3" required>
                                    <option value="">Select Role</option>
                                    <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($role->id); ?>" <?php if($role->default_set == 1): ?> selected <?php endif; ?>> <?php echo e($role->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                <?php if($errors->has('role_id')): ?>
                                    <span class="text-danger"><?php echo e($errors->first('role_id')); ?></span>
                                <?php endif; ?>
                            </div> <!-- /controls -->
                        </div> <!-- /control-group -->

                        <div class="control-group">
                            <label class="control-label asterisk" for="firstname">Apps:</label>
                            <div class="controls">
                                <select name="category_ids[]" class="span3" required multiple="multiple">
                                    <?php $__currentLoopData = $category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cat => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($cat); ?>"> <?php echo e($value); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                <?php if($errors->has('role_id')): ?>
                                    <span class="text-danger"><?php echo e($errors->first('role_id')); ?></span>
                                <?php endif; ?>
                            </div> <!-- /controls -->
                        </div> <!-- /control-group -->

                        <br />
                        <div class="form-actions">
                            <input class="btn btn-primary" type="submit" value="Submit">
                            <a href="<?php echo e(url('users')); ?>" class="btn btn-default">Back</a>
                        </div> <!-- /form-actions -->
                    </fieldset>
                </form>
                <!-- /shortcuts -->
                </div>
            </div>
            <!-- /widget-content -->
        </div>
        <!-- /widget -->
    </div>
    <script>
function myFunction() {
    var x = document.getElementById("password");
    if (x.type === "password") {
        x.type = "text";
    } else {
        x.type = "password";
    }
}
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>