<?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); ?>" method="post" >
                    <input type="hidden" name="questionCatagoryId" value="<?php echo e($categoryData->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" value="<?php echo e(old('title', $categoryData->title )); ?>" name="title"  type="text">
                        </div>
                         <div class="form-group mb-4">
                            <label><?php echo e(__('Sort Order')); ?></label>
                            <?php if($categoryData->question_order): ?>
                            <?php ($suggestedSortOrder = $categoryData->question_order); ?>
                            
                            <?php endif; ?>
                            <input class="form-control" value="<?php echo e(old('question_order',$suggestedSortOrder)); ?>" name="question_order"  type="text">
                        </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>
<!-- <script type="text/javascript">
    $(document).ready(function() {
    var max_fields      = 10; //maximum input boxes allowed
    var wrapper         = $(".input_fields_wrap"); //Fields wrapper
    var add_button      = $("#add_field_button"); //Add button ID
    
    var x = 1; //initlal text box count
    $(add_button).click(function(e){ //on add input button click
        e.preventDefault();
        if(x < max_fields){ //max input box allowed
            x++; //text box increment
            $(wrapper).append('<label><?php echo e(__('Question')); ?></label><div><input class="form-control" type="text" name="questionOptions[]"/><label><?php echo e(__('Question Options Sort Order')); ?></label><input class="form-control" name="question_options_sort_order[]" data-validation="required" type="text" value=""><button href="#" id="remove_field" class="float-lg-right btn btn-outline-success btn-icon-only btn-circle btn-sm btn-thick"><i class="la la-minus"></i></button></div>'); //add input box
        }
    });
    
    $(wrapper).on("click","#remove_field", function(e){ //user click on remove text
        e.preventDefault(); $(this).parent('div').remove(); x--;
    })
});
</script> -->
<?php $__env->stopSection(); ?>


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