<div class="modal fade" tabindex="-1" role="dialog" id="modal-wizard-neuro-epilepsy-dialog">

   <div class="modal-dialog modal-lg" role="document">

      <div class="modal-content">

         <div class="modal-header">

            <h5 class="modal-title"><?php echo _('Wizard Neuro Epilepsy'); ?></h5>

            <button type="button" class="close" data-dismiss="modal" aria-label="Close">

            <span aria-hidden="true">&times;</span>

            </button>

         </div>

         <div class="modal-body">

            <form id="wizard_epilepsy">

               <?php /*debug($this->view->surveyStructure['wizard-neuro-epilepsy']);*/ if(is_array($this->view->surveyStructure['wizard-neuro-epilepsy']) && !empty($this->view->surveyStructure['wizard-neuro-epilepsy'])): ?>

               <?php foreach($this->view->surveyStructure['wizard-neuro-epilepsy'] as $group_index => $wizard_item): ?>

               <div class="form-group margin-top-20 margin-bottom-20" id="id_group_wrapper_<?php echo $group_index; ?>">

                  <label class="label-main" for="id_group_<?php echo $group_index; ?><?php ?>"><?php echo $wizard_item['group']; ?></label>

                  <?php foreach($wizard_item['list'] as $question_index => $question_item): ?>

                  <div id="id_question_<?php echo $question_index; ?>" style="margin-left:20px;"><b><?php echo $question_item['question']; ?></b>

                     <?php if(isset($question_item['type']) && $question_item['type']=='textarea'):?>

					<textarea  id="question_value_<?php echo $question_index, '-0-0'; ?>" name="epilepsy[<?php echo $group_index; ?>][<?php echo $question_index; ?>][0]" class="form-control margin-bottom-20" rows="<?php echo $question_item['rows']; ?>"><?php echo $question_item['answers']; ?></textarea>

                     <?php endif ?>

                  </div>

                  <?php if(!$question_item['list']): ?>

                  <?php foreach($question_item['answers'] as $answer_index => $answer_item): ?>

                  <?php foreach($answer_item['values'] as $values_index => $values_item): ?>

                  <div class="radio" style="margin-left:20px;">

                     <label>

                     <input <?php echo isset($disabled) ? 'disabled' : ''; ?> type="radio" name="epilepsy[<?php echo $group_index; ?>][<?php echo $question_index; ?>][<?php echo $answer_index; ?>]" id="question_value_<?php echo $question_index, '-', $answer_index, '-', $values_index; ?>" value="<?php echo $values_index; ?>:<?php echo $values_item['label']; ?>" <?php echo isset($values_item['checked']) ? 'checked' : ''; ?>>

                     <?php echo $values_item['label']; ?>

                     </label>

                  </div>

                  <?php endforeach; ?>

                  <?php endforeach; ?>

                  <?php else: ?>

                  <?php foreach($question_item['answers'] as $answer_index => $answer_item): ?>

                  <div style="margin-left:40px;">

                     <div><i><?php echo $answer_item['label']; ?></i></div>

                     <?php foreach($answer_item['values'] as $values_index => $values_item): ?>

                     <div class="radio">

                        <label>

                        <input <?php echo isset($disabled) ? 'disabled' : ''; ?> type="radio" name="epilepsy[<?php echo $group_index; ?>][<?php echo $question_index; ?>][<?php echo $answer_index; ?>]" id="" value="<?php echo $values_index; ?>:<?php echo $values_item['label']; ?>" <?php echo isset($values_item['checked']) ? 'checked' : ''; ?>>

                        <?php echo $values_item['label']; ?>

                        </label>

                     </div>

                     <?php endforeach; ?>

                  </div>

                  <?php endforeach; ?>

                  <?php endif; ?>

                  <?php endforeach; ?>

               </div>

               <?php endforeach; ?>

               <?php endif; ?>

            </form>

         </div>

         <?php if(!isset($disabled)): ?>

         <div class="modal-footer">

            <button type="button" class="btn btn-primary btn-wizard-epilepsy-submit" data-dismiss="modal"><?php echo _('Done'); ?></button>

         </div>

         <?php endif; ?>

      </div>

   </div>

</div>

