Skip to content

Commit

Permalink
Fixed issue #10621: Empty label in "array NUMBER"
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Mar 3, 2016
1 parent 8f44c92 commit adc1ad5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/helpers/qanda_helper.php
Expand Up @@ -5734,7 +5734,7 @@ function do_array_multiflexi($ia)
// table-in-qanda-7
// $labelans
//$answer .= "\t<th data-title=\" \" class=\"answertext\" width=\"$answerwidth%\">\n"
$answer .= "\t<th data-title=\" \" class=\"answertext\" style='width: $answerwidth%;'>\n"
$answer .= "\t<th class=\"answertext\" style='width: $answerwidth%;'>\n"
. "$answertext\n"
. $hiddenfield
. "<input type=\"hidden\" name=\"java$myfname\" id=\"java$myfname\" value=\"";
Expand All @@ -5759,7 +5759,7 @@ function do_array_multiflexi($ia)
{
$myfname2_java_value = "";
}
$answer .= "\t<td class=\"answer-cell-5 answer_cell_00$ld question-item answer-item {$answertypeclass}-item $extraclass\">\n"
$answer .= "\t<td data-title=\"$answertext\" class=\"answer-cell-5 answer_cell_00$ld question-item answer-item {$answertypeclass}-item $extraclass\">\n"

This comment has been minimized.

Copy link
@Shnoulle

Shnoulle Mar 4, 2016

Collaborator

Danger : answertex can broke HTML : Expression Manager inside answertex can update this part. The only real way is to use the label (hidden for screen (or big screen).

There are bug reported for this in 1.92/2.0 : using EM in answertext/subquestion text :

  • Can break the page in some situation
  • ARe not updated when update a question in same group

In 2.06 :

. "\t<label for=\"answer{$myfname2}\"><input type=\"hidden\" name=\"java{$myfname2}\" id=\"java{$myfname2}\" $myfname2_java_value />\n";
//. "<label class=\"hidden-sm hidden-md hidden-lg read\" for=\"answer{$myfname2}\">{$labelans[$thiskey]}</label>\n";
$sSeparator = getRadixPointData($thissurvey['surveyls_numberformat']);
Expand Down
1 change: 0 additions & 1 deletion templates/default/scripts/template.js
Expand Up @@ -84,7 +84,6 @@ $(document).ready(function(){
//$content = '<td>'+$that.data('title')+'</td>';
$label = $that.data('title');
$input = $that.find('input');

//$that.empty().prepend($content);
$that.find('label').prepend($label);
});
Expand Down

0 comments on commit adc1ad5

Please sign in to comment.