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

<script>
    $(document).ready(function() {

        ClassicEditor.create(document.querySelector('#sub_question'))
            .then(editor => {
                console.log(editor);
            }).catch(error => {
                console.error(error);
            });

        ClassicEditor.create(document.querySelector('#sub_table_html'))
            .then(editor => {
                console.log(editor);
            }).catch(error => {
                console.error(error);
            });

        ClassicEditor.create(document.querySelector('#sub_table_js'))
            .then(editor => {
                console.log(editor);
            }).catch(error => {
                console.error(error);
            });

    });
</script>

<div class="row">
    <div class="col-sm-3">
        <?php echo $__env->make('sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </div>
    <div class="col-sm-9">
        <div class="row">
            <div class="col-sm-12 add-container">
                <div class="container subquiz-container">
                    <div class="row" style="margin: 0;">
                    <div class="col-sm-11">

                        <ol class="quiz-ol">
                            <li>
                                <?php echo $selectedSubQuestion->sub_question; ?>
                                <?php if($selectedSubQuestion->checkbox_options != null): ?>
                                <?php $checkboxOptions = explode(",", $selectedSubQuestion->checkbox_options); ?>
                                <?php $count = 0; ?>
                                <?php $__currentLoopData = $checkboxOptions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $option): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php $count++; ?>
                                <div class="col-4">
                                    <input type="checkbox" disabled="disabled" id="checkbox-<?php echo $selectedSubQuestion->sub_questionnaire_id."-".$count;?>" name="checkbox-<?php echo $selectedSubQuestion->sub_questionnaire_id;?>" value="<?php echo $option; ?>">
                                    <label for="checkbox-<?php echo $selectedSubQuestion->sub_questionnaire_id."-".$count;?>"> <?php echo $option; ?></label>
                                </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </li>
                        </ol>
                    </div>
                    <div class="col-sm-1" style="padding: 0;">
                        <a href="/questionnaire/view/<?php echo $selectedSubQuestion->questionnaire_id ?>">
                            <button class="btn float-right search-bt" style="padding: 2px 10px;">Back</button>
                        </a>
                    </div>
                    </div>
                </div>
                <form action="/subquestionnaire/save_sub" method="post" class="add-form">
                    <input type="hidden" id="questionnaire_id" name="questionnaire_id" value="<?php echo e($selectedSubQuestion->questionnaire_id); ?>" />
                    <input type="hidden" id="parent_sub_questionnaire_id" name="parent_sub_questionnaire_id" value="<?php echo e($selectedSubQuestion->sub_questionnaire_id); ?>" />
                    <div class="container">
                        <?php echo csrf_field(); ?>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_question_no">Sub Question Number</label>
                                    <input type="number" class="form-control <?php $__errorArgs = ['sub_question_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="sub_question_no" name="sub_question_no" placeholder="Sub Question Number" value="">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_question">Sub Question Body</label>
                                    <textarea id="sub_question" name="sub_question" cols="20" rows="30"></textarea>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_feedback" style="padding: 0px 6px;">Include Feed Back under Sub Question?</label>
                                    <input type="radio" name="sub_feedback" value="1">Yes
                                    <input type="radio" name="sub_feedback" value="0">No
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_sub_include_checkbox_options" style="padding: 0px 6px;">Include Checkbox Options under Sub Question?</label>
                                    <input type="radio" name="sub_sub_include_checkbox_options" onchange="checkSubSubCheckboxOption()" value="1">Yes
                                    <input type="radio" name="sub_sub_include_checkbox_options" onchange="checkSubSubCheckboxOption()" value="0">No
                                </div>
                            </div>
                        </div>

                        <div class="row" id="sub_sub_checkbox_options_div">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_sub_checkbox_options">Checkbox Options (Comma Separated)</label>
                                    <input type="text" class="form-control <?php $__errorArgs = ['sub_checkbox_options'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="sub_checkbox_options" name="sub_checkbox_options" placeholder="Checkbox Options" value="">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_sub_include_dropdown_options" style="padding: 0px 6px;">Include Drop Down Options under Sub Question?</label>
                                    <input type="radio" name="sub_sub_include_dropdown_options" onchange="checkSubSubDropdownOption()" value="1">Yes
                                    <input type="radio" name="sub_sub_include_dropdown_options" onchange="checkSubSubDropdownOption()" value="0">No
                                </div>
                            </div>
                        </div>

                        <div class="row" id="sub_sub_dropdown_options_div">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_dropdown_options">Drop Down Options (Comma Separated)</label>
                                    <input type="text" class="form-control <?php $__errorArgs = ['sub_dropdown_options'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="sub_dropdown_options" name="sub_dropdown_options" placeholder="Drop Down Options" value="">
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="needs_upload" style="padding: 0px 6px;">Include File Upload Option under Sub Question?</label>
                                    <input type="radio" name="needs_upload" value="1">Yes
                                    <input type="radio" name="needs_upload" value="0">No
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_sub_include_answers_table" style="padding: 0px 6px;">Include an Answers Table under Sub Question?</label>
                                    <input type="radio" name="sub_sub_include_answers_table" onchange="checkSubSubAnswersTable()" value="1">Yes
                                    <input type="radio" name="sub_sub_include_answers_table" onchange="checkSubSubAnswersTable()" value="0">No
                                </div>
                            </div>
                        </div>

                        <div class="row" id="sub_sub_table_no_div">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_table_no">Table No.</label>
                                    <input type="number" class="form-control <?php $__errorArgs = ['sub_table_no'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="sub_table_no" name="sub_table_no" placeholder="Table Number" value="">
                                </div>
                            </div>
                        </div>

                        <div class="row" id="sub_sub_table_title_div">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_table_title">Table Title</label>
                                    <input type="text" class="form-control <?php $__errorArgs = ['sub_table_title'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" id="sub_table_title" name="sub_table_title" placeholder="Table Title" value="">
                                </div>
                            </div>
                        </div>

                        <div class="row" id="sub_sub_table_html_div">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_table_html">Answers Table HTML Script (Be Careful with Your Unique IDs)</label>
                                    <textarea id="sub_table_html" name="sub_table_html" cols="20" rows="50"></textarea>
                                </div>
                            </div>
                        </div>

                        <div class="row" id="sub_sub_table_js_div">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label for="sub_table_js">Answers Table Javascript If Applicable</label>
                                    <textarea id="sub_table_js" name="sub_table_js" cols="20" rows="50"></textarea>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-9">
                                <button type="submit" class="btn btn-primary bt-margin">Save</button>
                            </div>
                        </div>

                    </div>
                </form>
            </div>

            <div class="container">
                <div class="row t-header">
                    <div class="col-6">Number</div>
                    <div class="col-6"></div>
                </div>
                <div id="questionnaires-data">
                    <?php $__currentLoopData = $sub_sub_questionnaires; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sub_questionnaire): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="row t-content">
                        <div class="col-6">
                            <?php echo e($sub_questionnaire->sub_question_no); ?>

                        </div>
                        <div class="col-6 edit-butts">
                            <span>
                                <i>DEEPEST CHILD</i>
                            </span>
                        </div>
                    </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </div>
    </div>

</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\src-compliance\resources\views/src/sub_sub_questionnaire.blade.php ENDPATH**/ ?>