Skip to content

Commit

Permalink
Fixed issue #10386: possible again to to edit text of answer option i…
Browse files Browse the repository at this point in the history
…n active survey
  • Loading branch information
LouisGac committed Feb 11, 2016
1 parent 32ffbb4 commit a242120
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions application/controllers/survey/index.php
Expand Up @@ -694,6 +694,9 @@ function _niceExit(&$redata, $iDebugLine, $sTemplateDir = null, $asMessage = arr
{
global $oTemplate;


$asMessage[]="<input type='hidden' class='hidemenubutton'/>";

if(isset($redata['surveyid']) && $redata['surveyid'] && !isset($thisurvey))
{
$thissurvey=getSurveyInfo($redata['surveyid']);
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -799,7 +799,7 @@ function run($surveyid,$args)

if (trim(str_replace(array('<p>','</p>'),'',$thissurvey['surveyls_endtext'])) == '')
{
$completed = "<br /><span class='success'>" . gT("Thank you!") . "</span><br /><br />\n\n"
$completed = "<br /><input type='hidden' class='hidemenubutton'/><span class='success'>" . gT("Thank you!") . "</span><br /><br />\n\n"
. gT("Your survey responses have been recorded.") . "<br /><br />\n";
}
else
Expand Down
2 changes: 1 addition & 1 deletion application/models/Answer.php
Expand Up @@ -144,7 +144,7 @@ public function updateRecord($data, $condition=FALSE)
}

function insertRecords($data)
{
{
$oRecord = new self;
foreach ($data as $k => $v)
$oRecord->$k = $v;
Expand Down
Expand Up @@ -172,7 +172,8 @@
<td style="vertical-align: middle;">
<input
type='hidden'
name='code_<?php echo $row->qid; ?>_<?php echo $row->scale_id; ?>'

name='code_<?php echo $position; ?>_<?php echo $scale_id; ?>'
value="<?php echo $title; ?>"
maxlength='20'
size='5'
Expand Down Expand Up @@ -319,7 +320,7 @@ class='answer form-control input-lg'

<?php echo getEditor("editanswer","answer_".$row->language."_".$row->qid."_{$row->scale_id}", "[".gT("Subquestion:", "js")."](".$row->language.")",$surveyid,$gid,$qid,'editanswer'); ?>

<?php if ($activated != 'Y' && $first):?>
<?php if ($activated != 'Y' && $first ):?>
<?php
// TODO : remove this if statement, and merge the two td
// implies : define in controller titles
Expand Down
7 changes: 6 additions & 1 deletion templates/default/scripts/template.js
Expand Up @@ -197,7 +197,12 @@ $(document).ready(function(){
}

});

});
}

// Hide the menu buttons at the end of the Survey
if($(".hidemenubutton").length>0)
{
$('.navbar-right').hide();
}
});

0 comments on commit a242120

Please sign in to comment.