Skip to content

Commit

Permalink
Fixed issue #11035: Group name and group description styling shown
Browse files Browse the repository at this point in the history
despite not chosen to show

Dev: Remove <blockquote> because it renders even if content is empty.
Dev: Check group description settings before rending group description.
  • Loading branch information
olleharstedt committed Apr 28, 2016
1 parent a59e860 commit a3ca496
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 6 additions & 1 deletion application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -1231,6 +1231,7 @@ function run($surveyid,$args)
echo "\n\n<!-- START THE GROUP (in SurveyRunTime ) -->\n";
echo "\n\n<div id='group-$_gseq'";
$gnoshow = LimeExpressionManager::GroupIsIrrelevantOrHidden($_gseq);

if ($gnoshow && !$previewgrp)
{
echo " style='display: none;'";
Expand All @@ -1239,7 +1240,11 @@ function run($surveyid,$args)
echo templatereplace(file_get_contents($sTemplateViewPath."startgroup.pstpl"), array(), $redata);
echo "\n";

if (!$previewquestion && trim($redata['groupdescription'])!="")
$aSurveyinfo = getSurveyInfo($surveyid);
$showgroupinfo = $aSurveyinfo['showgroupinfo'];
$showgroupdesc = $showgroupinfo == 'B' /* both */ || $showgroupinfo == 'D'; /* (group-) description */

if (!$previewquestion && trim($redata['groupdescription'])!="" && $showgroupdesc)
{
echo templatereplace(file_get_contents($sTemplateViewPath."groupdescription.pstpl"), array(), $redata);
}
Expand Down
4 changes: 1 addition & 3 deletions templates/default/views/startgroup.pstpl
@@ -1,6 +1,4 @@
<!-- Start group -->
<div class="col-xs-12 group-container">
<blockquote>
<h3 class="group-name">{GROUPNAME}</h3>
</blockquote>
<h3 class="group-name">{GROUPNAME}</h3>
</div>

1 comment on commit a3ca496

@Shnoulle
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, good job ... we don't test survey settings :)

Please sign in to comment.