Skip to content

Commit

Permalink
Merge branch 'master' of github.com:LimeSurvey/LimeSurvey
Browse files Browse the repository at this point in the history
  • Loading branch information
Shnoulle committed Jun 14, 2013
2 parents 39f8bfb + efae20f commit e39a8f4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions application/helpers/frontend_helper.php
Expand Up @@ -1380,10 +1380,10 @@ function buildsurveysession($surveyid,$preview=false)
echo '<div id="wrapper"><p id="tokenmessage">'.$clang->gT("This is a controlled survey. You need a valid token to participate.")."<br />";
echo $clang->gT("If you have been issued a token, please enter it in the box below and click continue.")."</p>
<script type='text/javascript'>var focus_element='#token';</script>"
.CHtml::form(array("/survey/index/sid/{$surveyid}"), 'post', array('id'=>'tokenform'))."
.CHtml::form(array("/survey/index/sid/{$surveyid}"), 'post', array('id'=>'tokenform','autocomplete'=>'off'))."
<ul>
<li>";?>
<label for='token'><?php $clang->eT("Token:");?></label><input class='text <?php echo $kpclass?>' id='token' type='text' name='token' />
<label for='token'><?php $clang->eT("Token:");?></label><input class='text <?php echo $kpclass?>' id='token' type='password' name='token' value='' />
<?php
echo "<input type='hidden' name='sid' value='".$surveyid."' id='sid' />
<input type='hidden' name='lang' value='".$templang."' id='lang' />";
Expand Down Expand Up @@ -1553,7 +1553,7 @@ function buildsurveysession($surveyid,$preview=false)
<input type='hidden' name='loadpass' value='".htmlspecialchars($_GET['loadpass'])."' id='loadpass' />";
}

echo '<label for="token">'.$clang->gT("Token")."</label><input class='text' type='text' id='token' name='token'></li>";
echo '<label for="token">'.$clang->gT("Token")."</label><input class='text' type='password' id='token' name='token'></li>";
}
else
{
Expand Down
14 changes: 11 additions & 3 deletions application/helpers/qanda_helper.php
Expand Up @@ -1283,13 +1283,21 @@ function do_date($ia)
}
}

$answer .= '<input class="text" type="text" size="10" name="'.$ia[1].'" style="display: none" id="answer'.$ia[1].'" value="'.$_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]].'" maxlength="10" alt="'.$clang->gT('Answer').'" onchange="'.$checkconditionFunction.'(this.value, this.name, this.type)" />
// Format the date for output
if (trim($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]])!='')
{
$datetimeobj = new Date_Time_Converter($_SESSION['survey_'.Yii::app()->getConfig('surveyID')][$ia[1]] , "Y-m-d H:i");
$dateoutput = $datetimeobj->convert($dateformatdetails['phpdate']);
}
else
{
$dateoutput='';
}
$answer .= '<input class="text" type="text" size="10" name="'.$ia[1].'" style="display: none" id="answer'.$ia[1].'" value="'.htmlspecialchars($dateoutput,ENT_QUOTES,'utf-8').'" maxlength="10" alt="'.$clang->gT('Answer').'" onchange="'.$checkconditionFunction.'(this.value, this.name, this.type)" />
</p>';
$answer .= '<input type="hidden" name="qattribute_answer[]" value="'.$ia[1].'" />
<input type="hidden" id="qattribute_answer'.$ia[1].'" name="qattribute_answer'.$ia[1].'" />
<input type="hidden" id="dateformat'.$ia[1].'" value="'.$dateformatdetails['jsdate'].'"/>';


}
else
{
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/survey/subview/tabTokens_view.php
Expand Up @@ -42,7 +42,7 @@ function alertPrivacy()
</li>
<li>
<label for='alloweditaftercompletion'><?php $clang->eT("Allow editing responses after completion?"); ?></label>
<select id='alloweditaftercompletion' name='alloweditaftercompletion' onchange="javascript: if (document.getElementById('private').value == 'Y') { alert('<?php $clang->eT("This option can't be set if Anonymous answers are used","js"); ?>'); this.value='N';}">
<select id='alloweditaftercompletion' name='alloweditaftercompletion' onchange="javascript: if (document.getElementById('anonymized').value == 'Y') { alert('<?php $clang->eT("This option can't be set if the option 'Anonymized Responses' is activated.","js"); ?>'); this.value='N';}">
<option value='Y'
<?php if ($esrow['alloweditaftercompletion'] == "Y") { ?>
selected='selected'
Expand Down

0 comments on commit e39a8f4

Please sign in to comment.