Skip to content

Commit

Permalink
Fixed issue #9477: Change of date stamp in survey settings shows a st…
Browse files Browse the repository at this point in the history
…range hint
  • Loading branch information
c-schmitz committed Jan 28, 2015
1 parent 1d8ac47 commit 51e8d5f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions application/views/admin/survey/activateSurvey_view.php
Expand Up @@ -44,7 +44,7 @@
</div>
<?php eT("Please check these settings now, then click the button below.");?>
<?php echo CHtml::form(array("admin/survey/sa/activate/surveyid/{$surveyid}/"), 'post', array('class'=>'form44')); ?>

<ul>
<li><label for='anonymized'><?php eT("Anonymized responses?"); ?>

Expand Down Expand Up @@ -73,7 +73,7 @@ function alertPrivacy()
</li>

<li><label for='datestamp'><?php eT("Date stamp?"); ?></label>
<select id='datestamp' name='datestamp' onchange='alertPrivacy();'>
<select id='datestamp' name='datestamp' onchange='alertDateStampAnonymization();'>
<option value='Y'
<?php if ($aSurveysettings['datestamp'] == "Y") { ?>
selected='selected'
Expand Down
Expand Up @@ -18,7 +18,7 @@
<span class='annotation'> <?php eT("Cannot be changed"); ?></span>
<?php echo CHtml::hiddenField('datestamp',$esrow['datestamp']); // Maybe use a readonly dropdown ??>
<?php } else { ?>
<?php echo CHtml::dropDownList('datestamp', $esrow['datestamp'],array("Y"=>gT("Yes"),"N"=>gT("No")),array('onchange'=>'alertPrivacy();')); ?>
<?php echo CHtml::dropDownList('datestamp', $esrow['datestamp'],array("Y"=>gT("Yes"),"N"=>gT("No")),array('onchange'=>'alertDateStampAnonymization();')); ?>
<?php } ?>
</li>

Expand Down
9 changes: 8 additions & 1 deletion application/views/admin/survey/subview/tabTokens_view.php
Expand Up @@ -14,6 +14,13 @@ function alertPrivacy()
alert(<?=json_encode(gT("Warning: If you turn on the -Anonymized responses- option and create a tokens table, LimeSurvey will mark your completed tokens only with a 'Y' instead of date/time to ensure the anonymity of your participants.")); ?>);
}
}
function alertDateStampAnonymization()
{
if (document.getElementById('anonymized').value == 'Y')
{
alert('<?php eT("Warning: If the option -Anonymized responses- is activated only a dummy date stamp (1980-01-01) will be used for all responses to ensure the anonymity of your participants.","js"); ?>');
}
}
//--></script></label>
<?php if ($esrow['active'] == "Y") {
if ($esrow['anonymized'] == "N") { ?>
Expand Down Expand Up @@ -118,4 +125,4 @@ function alertPrivacy()
<input type="number" min="5" max="36" step="1" pattern="\d*" value="<?php echo $esrow['tokenlength']; ?>" name='tokenlength' id='tokenlength' style='width:4em' />
</li>
</ul></div>

0 comments on commit 51e8d5f

Please sign in to comment.