<?php switch ($data['type']):?>
<?php case 'images-multiple-choice':?>
  <?php if (!empty($data['options'])):?>
    <div class="ulp-images-multiple-choice-wrapp">
        <?php foreach ($data['options'] as $key=>$value):?>
            <?php $key++;?>
            <div class="ulp-images-multiple-choice-one-item-wrapper">
              <div class="ulp-images-multiple-choice-one-item">

                  <div class="ulp-images-multiple-choice-one-item-img" style="background-image: url('<?php echo $value;?>')"></div>
                  <!--img src="<?php echo $value;?>" /-->
                  <div class="ulp-images-multiple-choice-one-item-checkbox">
                  	<input type="checkbox" name="<?php echo $data['name'] . '[]';?>" value="<?php echo $key;?>" />
              	</div>
              </div>
            </div>
        <?php endforeach;?>
    </div>
  <?php endif;?>
<?php break;?>
<?php case 'images-single-choice':?>
    <input type="hidden" name="<?php echo $data['name'];?>" value="" class="" id=""/>
    <?php if (!empty($data['options'])):?>
      <div class="ulp-images-single-choice-wrapp">
        <?php foreach ($data['options'] as $key=>$value):?>
            <?php $key++;?>

        	  <div class="ulp-images-single-choice-one-item-wrapper">
            	<div class="ulp-images-single-choice-one-item">
              	  <div class="ulp-images-single-choice-one-item-img" style="background-image: url('<?php echo $value;?>')" data-value="<?php echo $key;?>" ></div>
              	  <!--img src="<?php echo $value;?>" /-->
            	</div>
            </div>
        <?php endforeach;?>
      </div>
    <?php endif;?>

    <script src="<?php echo ULP_URL . 'assets/js/form_field-image_single_choice.js';?>"></script>
    <script>
    UlpFormFieldSingleChoice.init({
        'wrapper' : '.ulp-images-single-choice-wrapp .ulp-images-single-choice-one-item',
        'name' : <?php echo $data['name'];?>,
        'selectedClass' : 'selected'
    });
    </script>
<?php break;?>
<?php case 'matching':?>
<div class="ulp-micro-questions">
  <?php if ($data['questions']):?>
    <?php foreach ($data['questions'] as $question):?>
    <div class="row ulp-matching-question">
        <div class="ulp-micro-question js-ulp-micro-question"><?php echo $question;?></div>
        <div class="ulp-micro-answer">
            <input type="hidden" name="<?php echo $data['name'];?>[]" value="" data-field_type="matching" />
        </div>
    </div>
    <?php endforeach;?>
  <?php endif;?>
</div>

<div class="ulp-micro-answers-possible">
  <?php if ($data['answers']):?>
    <?php foreach ($data['answers'] as $answer):?>
        <div class="ulp-item" title="<?php _e('Move the box on the right position','ulp');?>" data-answer_key="<?php echo $answer;?>"><?php echo $answer;?></div>
    <?php endforeach;?>
  <?php endif;?>
</div>
<div class="ulp-clear"></div>

<script src="<?php echo ULP_URL . 'assets/js/form_fields-matching_type.js';?>" ></script>
<script>
UlpFormFieldMatching.init({
    droppableClass: '.ulp-micro-answer',
    draggableClass: '.ulp-item',
    possibleAnswersWrapp: '.ulp-micro-answers-possible',
    standardTitleMessage: '<?php _e('Move the box on the right position','ulp');?>',
    extraTitleMessage: '<?php _e('Double click to remove', 'ulp');?>',
});
</script>

<?php break;?>
<?php endswitch;?>
