Skip to content

Commit

Permalink
Fixed issue #10454: Slider Label for multiple numeric input question …
Browse files Browse the repository at this point in the history
…not shown correctly
  • Loading branch information
LouisGac committed Feb 22, 2016
1 parent f689996 commit 40a6c87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions application/helpers/qanda_helper.php
Expand Up @@ -3153,6 +3153,7 @@ function do_multiplenumeric($ia)
{
foreach($aSubquestions as $ansrow)
{
$labelText = $ansrow['question'];
$myfname = $ia[1].$ansrow['title'];
if ($ansrow['question'] == "") {$ansrow['question'] = " ";}
if ($slider_layout === false || $slider_separator == '')
Expand All @@ -3164,12 +3165,15 @@ function do_multiplenumeric($ia)
{
$aAnswer=explode($slider_separator,$ansrow['question']);
$theanswer=(isset($aAnswer[0]))?$aAnswer[0]:"";
$labelText=$theanswer;
$sliderleft=(isset($aAnswer[1]))?$aAnswer[1]:"";
$sliderright=(isset($aAnswer[2]))?$aAnswer[2]:"";
$sliders = true;
$sliderright="<div class=\"slider_righttext\">$sliderright</div>";
//$sliderright="<span class=\"slider_righttext\">$sliderright</span>";
}

/*$prefix = (isset($sliderleft))?$sliderleft:$prefix;
$suffix = (isset($sliderright))?$sliderright:$suffix;*/
$aAnswer=(isset($aAnswer))?$aAnswer:'';
$sliderleft=(isset($sliderleft))?$sliderleft:"";
$sliderright=(isset($sliderright))?$sliderright:"";
Expand Down Expand Up @@ -3220,7 +3224,7 @@ function do_multiplenumeric($ia)
'myfname'=>$myfname,
'dispVal'=>$dispVal,
'maxlength'=>$maxlength,
'labelText'=>$ansrow['question'],
'labelText'=>$labelText,
'checkconditionFunction'=>$checkconditionFunction.'(this.value, this.name, this.type)',
'slider_orientation' => $slider_orientation,
'slider_step' => $slider_step ,
Expand Down
3 changes: 2 additions & 1 deletion application/views/survey/questions/multiplenumeric/item.php
Expand Up @@ -23,7 +23,6 @@
<div class="alert alert-danger errormandatory" role="alert">
<?php echo $labelText;?>
</div> <!-- alert -->

<?php endif;?>
<div class="form-group-row row">
<label class='control-label col-xs-12' for="answer<?php echo $myfname; ?>">
Expand All @@ -32,6 +31,7 @@
<br/><br/><br/>
<div class="col-xs-12 input">
<?php echo $prefix;?>
<?php echo $sliderleft;?>
<?php if(!$sliders): ?>
<input
class="text form-control <?php echo $kpclass;?>"
Expand Down Expand Up @@ -62,6 +62,7 @@ class="text form-control <?php echo $kpclass;?>"
data-slider-tooltip='always'
/>
<?php endif;?>
<?php echo $sliderright;?>
<?php echo $suffix;?>
</div> <!-- xs-12 -->
</div> <!-- form group -->
Expand Down

0 comments on commit 40a6c87

Please sign in to comment.