<?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; ?>
     <?php if($errors->any()): ?>
          <div class="alert alert-danger">
              <ul>
                  <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <li><?php echo e($error); ?></li>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
              </ul>
          </div>
    <?php endif; ?>
    <div class="page-content fade-in-up">
     <div class="row">
        <div class="col-md-12">
            <div class="ibox">
                <form class="form-purple" action="<?php echo e(route('chief_complains_save')); ?>" method="post"  enctype="multipart/form-data">
                    <input type="hidden" name="suggestedSort_order" value="<?php echo e(@$chiefComplaints->sort_order); ?>">
                    <input type="hidden" name="chiefComplaintsId" value="<?php echo e(@$chiefComplaints->id); ?>">
                    <div class="ibox-head">
                        <div class="ibox-title"><?php echo e(@$heading); ?></div>
                    </div>
                    <div class="ibox-body col-md-8">
                        <div class="form-group mb-4">
                            <label><?php echo e(__('Title')); ?></label>
                            <input class="form-control" name="name" type="text" placeholder="Neuro Dignostics" value="<?php echo e(old('name',@$chiefComplaints->name)); ?>">
                        </div> 
                        <div class="form-group mb-4">
                            <label><?php echo e(__('Image')); ?></label><br>
                            <?php if(@$chiefComplaints->image_front): ?>
                            <img src="<?php echo e(@$image_front); ?>" width="400px"><br><br> 
                            <?php endif; ?>
                            <input type="hidden" name="old_front_image" value="<?php echo e(@$chiefComplaints->image_front); ?>">
                            <?php if(@$chiefComplaints->image_front == ""): ?>
                            <?php ($required = 'required'); ?>
                            <?php else: ?>
                            <?php ($required = ''); ?>
                            <?php endif; ?>
                            <input class="form-control" name="image_front"  type="file"  value="" data-validation="<?php echo e($required); ?>">
                        </div> 
                        <!--<div class="form-group mb-4">-->
                        <!--    <label><?php echo e(__('Back Image')); ?></label><br>-->
                        <!--    <?php if(@$chiefComplaints->image_back): ?>-->
                        <!--    <img src="<?php echo e(@$image_back); ?>" width="400px"><br><br>-->
                        <!--    <?php endif; ?>-->
                        <!--    <input type="hidden" name="old_back_image" value="<?php echo e(@$chiefComplaints->image_back); ?>"><?php echo e(@$back_image['basename']); ?>-->
                        <!--    <?php if(@$chiefComplaints->image_back == ""): ?>-->
                        <!--    <?php ($required = 'required'); ?>-->
                        <!--    <?php else: ?>-->
                        <!--    <?php ($required = ''); ?>-->
                        <!--    <?php endif; ?>-->
                        <!--    <input class="form-control" name="image_back"  type="file"  value="">-->
                        <!--</div> -->
                        <div class="form-group mb-4">
                            <label><?php echo e(__('Sort Order')); ?></label>
                            <?php if(@$chiefComplaints->sort_order): ?>
                            <?php ($suggestedSortOrder = $chiefComplaints->sort_order); ?>
                            <?php endif; ?>
                            <input class="form-control" name="sort_order" type="number" value="<?php echo e(old('sort_order',@$suggestedSortOrder)); ?>">
                        </div> 
                       <!--  <div class="form-group mb-4">
                            <label><?php echo e(__('Extension')); ?></label>
                            <input class="form-control" name="extension" data-validation="required" type="text" placeholder="" value="<?php echo e(@$userData->extension); ?>">
                        </div>  -->
                    </div>
                    <div class="ibox-footer">
                        <button title="Submit" class="btn btn-primary mr-2" type="submit" 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(); ?>


<?php echo $__env->make('physician.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>