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 e60fe6c commit 970d07e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions application/views/admin/survey/activateSurvey_view.php
Expand Up @@ -44,7 +44,7 @@
</div>
<?php $clang->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 $clang->eT("Anonymized responses?"); ?>

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

<li><label for='datestamp'><?php $clang->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 $clang->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 Expand Up @@ -52,7 +52,7 @@
</li>

<li><label for='savetimings'><?php $clang->eT("Save timings?"); ?></label>
<?php
<?php
if ($esrow['active']=="Y")
{ ?>
<?php if ($esrow['savetimings'] != "Y") { $clang->eT("Timings will not be saved.");}
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('<?php $clang->eT("Warning"); ?>: <?php $clang->eT("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.","js"); ?>');
}
}
function alertDateStampAnonymization()
{
if (document.getElementById('anonymized').value == 'Y')
{
alert('<?php $clang->eT("Warning"); ?>: <?php $clang->eT("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 @@ -120,4 +127,4 @@ function alertPrivacy()
<input type='text' value="<?php echo $esrow['tokenlength']; ?>" name='tokenlength' id='tokenlength' size='4' maxlength='2' onkeypress="return goodchars(event,'0123456789')" />
</li>
</ul></div>

0 comments on commit 970d07e

Please sign in to comment.