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

    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title"><?php echo app('translator')->get('app.edit'); ?></h4>

                    <form class="ajax-form" method="POST" id="createForm">
                        <?php echo csrf_field(); ?>

                        <input name="_method" type="hidden" value="PUT">

                    <div id="education_fields"></div>
                    <div class="row">
                        <div class="col-sm-9 nopadding">
                            <div class="form-group">
                                <div class="input-group">
                                    <input type="text" name="question" value="<?php echo e($question->question); ?>" class="form-control" placeholder="<?php echo app('translator')->get('menu.jobCategories'); ?> <?php echo app('translator')->get('app.name'); ?>">

                                </div>
                            </div>
                        </div>
                        <div class="col-md-9">
                            <div class="form-group">
                                <label for="address"><?php echo app('translator')->get('app.required'); ?></label>
                                <select name="required" class="form-control">
                                    <option <?php if($question->required == 'yes'): ?> selected <?php endif; ?> value="yes"><?php echo app('translator')->get('app.yes'); ?></option>
                                    <option <?php if($question->required == 'no'): ?> selected <?php endif; ?>  value="no"><?php echo app('translator')->get('app.no'); ?></option>
                                </select>
                            </div>
                        </div>
                        <div class="col-md-9">
                            <div class="form-group">
                                <label for="type"><?php echo app('translator')->get('app.type'); ?></label>
                                <select name="type" class="form-control">
                                    <option <?php if($question->type == 'text'): ?> selected <?php endif; ?> value="text"><?php echo app('translator')->get('app.text'); ?></option>
                                    <option <?php if($question->type == 'file'): ?> selected <?php endif; ?> value="file"><?php echo app('translator')->get('app.file'); ?></option>
                                </select>
                            </div>
                        </div>
                    </div>

                    <button type="button" id="save-form" class="btn btn-success"><i class="fa fa-check"></i> <?php echo app('translator')->get('app.save'); ?></button>

                    </form>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('footer-script'); ?>
<script>
    // Update Question
    $('#save-form').click(function () {
        $.easyAjax({
            url: '<?php echo e(route('admin.questions.update', $question->id)); ?>',
            container: '#createForm',
            type: "POST",
            redirect: true,
            data: $('#createForm').serialize()
        })
    });
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/hoseadevimcon/hr.hosea.dev-imcon.com/resources/views/admin/question/edit.blade.php ENDPATH**/ ?>