<?php $__env->startSection('content'); ?>

 <?php $success = false; ?>
    <?php if(\Session::has('error')): ?>
        <div class="alert alert-danger">
            <?php echo \Session::get('error'); ?>

        </div>
    <?php endif; ?>
    <?php if(\Session::has('success')): ?>
    <?php $success = true; ?> 
        <div class="alert alert-success">
            <?php echo \Session::get('success'); ?>

        </div>
    <?php endif; ?>
    
<div class="page-content fade-in-up">
    <div class="row">
        <div class="col-md-6">
            <div class="ibox">
                <form class="form-purple" action="<?php echo e($formAction); ?>">
                    <div class="ibox-head">
                        <div class="ibox-title"><?php echo e($formHeading); ?></div>
                    </div>
                    <div class="ibox-body">
                        <div class="form-group mb-4">
                            <label><?php echo e(__('Name')); ?></label>
                            <input class="form-control" name="name" data-validation="required" type="text" placeholder="neuro diagnostics" value="<?php echo e($formData->name); ?>">
                        </div> 
                        <div class="form-group mb-4">
                            <label><?php echo e(__('Email')); ?></label>
                            <input class="form-control" name="email" data-validation="required email" type="text" placeholder="user@neurodiagnostics.com" value="<?php echo e($formData->email); ?>">
                        </div>  
                        <div class="form-group mb-4">
                            <label><?php echo e(__('Contact')); ?></label>
                            <input class="form-control" name="contact" data-validation="required" type="text" placeholder="e.g 090078691" value="<?php echo e($formData->contact); ?>">
                        </div>
                        <div class="form-group mb-4">
                            <label>Select Role</label>
                            <select class="form-control form-control-air" name="roles[]" multiple="" data-validation="required">
                                <?php $__currentLoopData = $formData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $formData): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($formData->id); ?>"><?php echo e(ucfirst($formData->name)); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>  
                    </div>
                    <div class="ibox-footer">
                        <button title="Submit" class="btn btn-primary mr-2" name="btn-submit" value="submit"><?php echo e(__('Submit')); ?></button>
                        <!-- <button class="btn btn-outline-secondary" type="reset">Cancel</button> -->
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- JS FORM VALIDATION -->

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
<script>
  $.validate({
    lang: 'en'
  });
</script>

<?php $__env->stopSection(); ?>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.4.0.min.js"></script>
<script type="text/javascript" src="<?php echo e(asset('vendor/jsvalidation/js/jsvalidation.js')); ?>"></script>

<?php $__env->startSection('scripts'); ?>
<script>
   setTimeout(function() {
        $('.input-group.date').datepicker({
            todayBtn: "linked",
            keyboardNavigation: false,
            forceParse: false,
            calendarWeeks: true,
            autoclose: true,
            format: 'yyyy-mm-dd',
        });
    }, 200);</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>