Skip to content

Commit

Permalink
Revert: some alert and automatic exclusive option
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed May 14, 2012
1 parent 1c7ea3c commit a5b2d73
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<span class='annotation'> <?php $clang->eT("Cannot be changed"); ?></span>
<input type='hidden' name='ipaddr' value='<?php echo $esrow['ipaddr']; ?>' />
<?php } else { ?>
<select name='ipaddr' id='ipaddr' onchange='alertPrivacy("ipaddr");'>
<select name='ipaddr' id='ipaddr'>
<option value='Y'
<?php if ($esrow['ipaddr'] == "Y") { ?>
selected='selected'
Expand Down Expand Up @@ -79,7 +79,7 @@
<span class='annotation'> <?php $clang->eT("Cannot be changed"); ?></span>
<input type='hidden' name='refurl' value='<?php echo $esrow['refurl']; ?>' />
<?php } else { ?>
<select name='refurl' id='refurl' onchange='alertPrivacy("refurl");'>
<select name='refurl' id='refurl'>
<option value='Y'
<?php if ($esrow['refurl'] == "Y") { ?>
selected='selected'
Expand Down Expand Up @@ -168,4 +168,4 @@
><?php $clang->eT("Survey name-[SID]/Group name"); ?></option>
</select></li>

</ul></div>
</ul></div>
32 changes: 6 additions & 26 deletions application/views/admin/survey/subview/tabTokens_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,16 @@
<li><label for='anonymized'><?php $clang->eT("Anonymized responses?"); ?>

<script type="text/javascript"><!--
function alertPrivacy(source)
function alertPrivacy()
{
if ( source === undefined ) {
source = '';
}
if ($('#tokenanswerspersistence').val() == 'Y')
if (document.getElementById('tokenanswerspersistence').value == 'Y')
{
alert('<?php $clang->eT("You can't use Anonymized responses when Token-based answers persistence is enabled.","js"); ?>');
document.getElementById('anonymized').value = 'N';
}
else if ($('#anonymized').val() == 'Y')
else if (document.getElementById('anonymized').value == 'Y')
{
txtalert="";
if(source=='anonymized')
{
txtalert='<?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"); ?>';
}
if($('#ipaddr').val() == 'Y')
{
$('#ipaddr').val('N');
txtalert=txtalert+'\n<?php $clang->eT("Warning"); ?>: <?php $clang->eT("You can not save ip address with Anonymized responses. Save IP Address is set to NO.","js"); ?>';
}
if($('#refurl').val() == 'Y')
{
$('#refurl').val('N');
txtalert=txtalert+'\n<?php $clang->eT("Warning"); ?>: <?php $clang->eT("You can not save referrer URL with Anonymized responses. Save referrer URL is set to NO.","js"); ?>';
}
if(txtalert){
alert(txtalert);
}
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"); ?>');
}
}
//--></script></label>
Expand All @@ -46,7 +26,7 @@ function alertPrivacy(source)
<span class='annotation'> <?php $clang->eT("Cannot be changed"); ?></span>
<input type='hidden' name='anonymized' value="<?php echo $esrow['anonymized']; ?>" />
<?php } else { ?>
<select id='anonymized' name='anonymized' onchange='alertPrivacy("anonymized");'>
<select id='anonymized' name='anonymized' onchange='alertPrivacy();'>
<option value='Y'
<?php if ($esrow['anonymized'] == "Y") { ?>
selected='selected'
Expand Down Expand Up @@ -141,4 +121,4 @@ function alertPrivacy(source)
</li>


</ul></div>
</ul></div>

0 comments on commit a5b2d73

Please sign in to comment.