Skip to content

Commit

Permalink
Fixed issue #10418: Quotation marks are not rendered correctly in dro…
Browse files Browse the repository at this point in the history
…pdowns in admin interface
  • Loading branch information
c-schmitz committed Feb 12, 2016
1 parent c667feb commit 435c127
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 60 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/dataentry.php
Expand Up @@ -661,8 +661,8 @@ public function editdata($subaction, $id, $surveyid, $language='')
$selected = (empty($idrow['submitdate'])) ? 'N' : $completedate;

$select_options = array(
'N' => gT('No'),
$completedate => gT('Yes')
'N' => gT('No','unescaped'),
$completedate => gT('Yes','unescaped')
);

$aDataentryoutput .= CHtml::dropDownList('completed', $selected, $select_options, array('class'=>'form-control'));
Expand Down
10 changes: 5 additions & 5 deletions application/views/admin/export/vv_view.php
Expand Up @@ -14,9 +14,9 @@
<li>
<label for='completionstate'><?php eT("Export");?>:</label>
<?php echo CHtml::dropDownList('completionstate', $selectincansstate, array(
'complete' => gT("Completed responses only"),
'all' => gT("All responses"),
'incomplete' => gT("Incomplete responses only"),
'complete' => gT("Completed responses only",'unescaped'),
'all' => gT("All responses",'unescaped'),
'incomplete' => gT("Incomplete responses only",'unescaped'),
), array('class'=>'form-control')); ?>
</li>
<li>
Expand All @@ -26,8 +26,8 @@
<li>
<label for='vvversion' title='<?php eT("If you want to import survey on old installation or if your survey have problem: use old version (automatically selected if some code are duplicated).");?>'><?php eT("VV export version");?>: </label>
<?php echo CHtml::dropDownList('vvversion', $vvversionseleted, array(
'2' => gT("Last VV version"),
'1' => gT("Old VV version"),
'2' => gT("Last VV version",'unescaped'),
'1' => gT("Old VV version",'unescaped'),
), array('class'=>'form-control'));; ?>
<li>
</ul>
Expand Down
Expand Up @@ -25,7 +25,7 @@
<li>
<label>&nbsp;</label>
<div class="col-sm-6">
<?php echo CHtml::dropDownList('type', 'files', array('files' => gT('Files'), 'flash' => gT('Flash'), 'images' => gT('Images')), array('class'=>' form-control') ); ?>
<?php echo CHtml::dropDownList('type', 'files', array('files' => gT('Files','unescaped'), 'flash' => gT('Flash','unescaped'), 'images' => gT('Images','unescaped')), array('class'=>' form-control') ); ?>
</div>
<div class="col-sm-5">
<input type='submit' class="btn btn-default" value="<?php eT("Browse uploaded resources") ?>" />
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/participants/blacklist_view.php
Expand Up @@ -13,7 +13,7 @@
{
$attribute = array('class' => 'col-md-6 col-md-offset-3');
echo CHtml::beginForm($this->createUrl('/admin/participants/sa/storeBlacklistValues'), 'post', $attribute);
$options = array('Y' => gT('Yes'), 'N' => gT('No'));
$options = array('Y' => gT('Yes','unescaped'), 'N' => gT('No','unescaped'));
?>
<div class="form-group">
<label for='blacklistallsurveys' id='blacklistallsurveys'>
Expand Down
6 changes: 3 additions & 3 deletions application/views/admin/participants/userControl_view.php
Expand Up @@ -11,7 +11,7 @@
{
$attribute = array('class' => 'col-md-6 col-md-offset-3');
echo CHtml::beginForm($this->createUrl('/admin/participants/sa/storeUserControlValues'), 'post', $attribute);
$options = array('Y' => gT('Yes'), 'N' => gT('No'));
$options = array('Y' => gT('Yes','unescaped'), 'N' => gT('No','unescaped'));
?>
<div class="form-group">
<label for='userideditable' id='userideditable'>
Expand All @@ -33,8 +33,8 @@
}
?>
</div>

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

Expand Up @@ -6,7 +6,7 @@

<?php
$aOptions = array();
$aOptions[''] = gT('Select...');
$aOptions[''] = gT('Select...','unescaped');
foreach (getLanguageData(false, Yii::app()->session['adminlang']) as $langkey2 => $langname)
{
$aOptions[$langkey2] = $langname['description'];
Expand Down
8 changes: 4 additions & 4 deletions application/views/admin/responses/browseallheader_view.php
Expand Up @@ -45,15 +45,15 @@
}
?>
<?php echo CHtml::form(array("admin/responses/sa/browse/surveyid/{$surveyid}/"), 'post', array('id'=>'browseresults')); ?>

<?php eT("Records displayed:"); ?><input type='text' size='4' value='<?php echo $dtcount2; ?>' name='limit' id='limit' />
&nbsp;&nbsp; <?php eT("Starting from:"); ?><input type='text' size='4' value='<?php echo $start; ?>' name='start' id='start' />
&nbsp;&nbsp; <input type='submit' value='<?php eT("Show"); ?>' />
&nbsp;&nbsp; <?php eT("Display:"); ?>
<?php echo CHtml::dropDownList('completionstate',$sCompletionStateValue,
array('all'=> gT("All responses"),
'complete'=> gT("Completed responses only"),
'incomplete'=> gT("Incomplete responses only"))
array('all'=> gT("All responses",'unescaped'),
'complete'=> gT("Completed responses only",'unescaped'),
'incomplete'=> gT("Incomplete responses only",'unescaped'))
); ?>
<input type='hidden' name='sid' value='<?php echo $surveyid; ?>' />
<input type='hidden' name='action' value='browse' />
Expand Down
Expand Up @@ -59,9 +59,9 @@ public function run()
$sElement_id = 'defaultanswerscale_0_' . $language;

$aList = array(
'N' => gT('No'),
'Y' => gT('YES'),
'EM' => gT('EM Value')
'N' => gT('No','unescaped'),
'Y' => gT('Yes','unescaped'),
'EM' => gT('EM value','unescaped')
);

$aHtmlOptions = array(
Expand Down
Expand Up @@ -35,7 +35,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'=>'alertDateStampAnonymization();', 'class'=>"form-control" )); ?>
<?php echo CHtml::dropDownList('datestamp', $esrow['datestamp'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')),array('onchange'=>'alertDateStampAnonymization();', 'class'=>"form-control" )); ?>
<?php } ?>
</div>
</div>
Expand All @@ -53,7 +53,7 @@
<span class='annotation'> <?php eT("Cannot be changed"); ?></span>
<?php echo CHtml::hiddenField('ipaddr',$esrow['ipaddr']); // Maybe use a readonly dropdown ??>
<?php } else { ?>
<?php echo CHtml::dropDownList('ipaddr', $esrow['ipaddr'],array("Y"=>gT("Yes"),"N"=>gT("No")), array('class'=>"form-control")); ?>
<?php echo CHtml::dropDownList('ipaddr', $esrow['ipaddr'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')), array('class'=>"form-control")); ?>
<?php } ?>
</div>
</div>
Expand All @@ -71,7 +71,7 @@
<span class='annotation'> <?php eT("Cannot be changed"); ?></span>
<?php echo CHtml::hiddenField('refurl',$esrow['refurl']); // Maybe use a readonly dropdown ??>
<?php } else { ?>
<?php echo CHtml::dropDownList('refurl', $esrow['refurl'],array("Y"=>gT("Yes"),"N"=>gT("No")), array('class'=>"form-control")); ?>
<?php echo CHtml::dropDownList('refurl', $esrow['refurl'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')), array('class'=>"form-control")); ?>
<?php } ?>
</div>
</div>
Expand All @@ -90,7 +90,7 @@
<?php }
else
{ ?>
<?php echo CHtml::dropDownList('savetimings', $esrow['savetimings'],array("Y"=>gT("Yes"),"N"=>gT("No")), array('class'=>"form-control")); ?>
<?php echo CHtml::dropDownList('savetimings', $esrow['savetimings'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')), array('class'=>"form-control")); ?>
<?php } ?>
</div>
</div>
Expand All @@ -99,15 +99,15 @@
<div class="form-group">
<label class="col-sm-4 control-label" for='assessments'><?php eT("Enable assessment mode:"); ?></label>
<div class="col-sm-8">
<?php echo CHtml::dropDownList('assessments', $esrow['assessments'],array("Y"=>gT("Yes"),"N"=>gT("No")), array('class'=>"form-control")); ?>
<?php echo CHtml::dropDownList('assessments', $esrow['assessments'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')), array('class'=>"form-control")); ?>
</div>
</div>

<!-- Participant may save and resume -->
<div class="form-group">
<label class="col-sm-4 control-label" for='allowsave'><?php eT("Participant may save and resume later:"); ?></label>
<div class="col-sm-8">
<?php echo CHtml::dropDownList('allowsave', $esrow['allowsave'],array("Y"=>gT("Yes"),"N"=>gT("No")), array('class'=>"form-control")); ?>
<?php echo CHtml::dropDownList('allowsave', $esrow['allowsave'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')), array('class'=>"form-control")); ?>
</div>
</div>

Expand All @@ -123,7 +123,7 @@
<div class="form-group">
<label class="col-sm-4 control-label" for='googleanalyticsstyle'><?php eT("Google Analytics style for this survey:"); ?></label>
<div class="col-sm-8">
<?php echo CHtml::dropDownList('googleanalyticsstyle', $esrow['googleanalyticsstyle'],array("0"=>gT("Do not use Google Analytics"),"1"=>gT("Default Google Analytics"),"2"=>gT("Survey name-[SID]/Group name")), array('class'=>"form-control")); ?>
<?php echo CHtml::dropDownList('googleanalyticsstyle', $esrow['googleanalyticsstyle'],array("0"=>gT("Do not use Google Analytics",'unescaped'),"1"=>gT("Default Google Analytics",'unescaped'),"2"=>gT("Survey name-[SID]/Group name",'unescaped')), array('class'=>"form-control")); ?>
</div>
</div>
</div>
Expand Up @@ -117,9 +117,9 @@

<?php
$data = array(
0 => gT('Disabled'),
1 => gT('Incremental'),
2 => gT('Full')
0 => gT('Disabled','unescaped'),
1 => gT('Incremental','unescaped'),
2 => gT('Full','unescaped')
);
echo CHtml::dropDownList('questionindex', $esrow['questionindex'], $data, array(
'id' => 'questionindex',
Expand Down
Expand Up @@ -10,7 +10,7 @@
<ul class="list-unstyled">
<li>
<label>&nbsp;</label>
<?php echo CHtml::dropDownList('type', 'files', array('files' => gT('Files'), 'flash' => gT('Flash'), 'images' => gT('Images'))); ?>
<?php echo CHtml::dropDownList('type', 'files', array('files' => gT('Files','unescaped'), 'flash' => gT('Flash','unescaped'), 'images' => gT('Images','unescaped'))); ?>
<input type='submit' class="btn btn-default" value="<?php eT("Browse Uploaded Resources") ?>" />
</li>
<li>
Expand Down
14 changes: 7 additions & 7 deletions application/views/admin/survey/subview/tabNotification_view.php
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'=>'alertDateStampAnonymization();')); ?>
<?php echo CHtml::dropDownList('datestamp', $esrow['datestamp'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')),array('onchange'=>'alertDateStampAnonymization();')); ?>
<?php } ?>
</li>

Expand All @@ -32,7 +32,7 @@
<span class='annotation'> <?php eT("Cannot be changed"); ?></span>
<?php echo CHtml::hiddenField('ipaddr',$esrow['ipaddr']); // Maybe use a readonly dropdown ??>
<?php } else { ?>
<?php echo CHtml::dropDownList('ipaddr', $esrow['ipaddr'],array("Y"=>gT("Yes"),"N"=>gT("No"))); ?>
<?php echo CHtml::dropDownList('ipaddr', $esrow['ipaddr'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped'))); ?>
<?php } ?>
</li>

Expand All @@ -47,7 +47,7 @@
<span class='annotation'> <?php eT("Cannot be changed"); ?></span>
<?php echo CHtml::hiddenField('refurl',$esrow['refurl']); // Maybe use a readonly dropdown ??>
<?php } else { ?>
<?php echo CHtml::dropDownList('refurl', $esrow['refurl'],array("Y"=>gT("Yes"),"N"=>gT("No"))); ?>
<?php echo CHtml::dropDownList('refurl', $esrow['refurl'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped'))); ?>
<?php } ?>
</li>

Expand All @@ -62,24 +62,24 @@
<?php }
else
{ ?>
<?php echo CHtml::dropDownList('savetimings', $esrow['savetimings'],array("Y"=>gT("Yes"),"N"=>gT("No"))); ?>
<?php echo CHtml::dropDownList('savetimings', $esrow['savetimings'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped'))); ?>
<?php } ?>
</li>

<li><label for='assessments'><?php eT("Enable assessment mode?"); ?></label>
<?php echo CHtml::dropDownList('assessments', $esrow['assessments'],array("Y"=>gT("Yes"),"N"=>gT("No"))); ?>
<?php echo CHtml::dropDownList('assessments', $esrow['assessments'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped'))); ?>
</li>

<li><label for='allowsave'><?php eT("Participant may save and resume later?"); ?></label>
<?php echo CHtml::dropDownList('allowsave', $esrow['allowsave'],array("Y"=>gT("Yes"),"N"=>gT("No"))); ?>
<?php echo CHtml::dropDownList('allowsave', $esrow['allowsave'],array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped'))); ?>
</li>

<li><label for='googleanalyticsapikey'><?php eT("Google Analytics API key for this survey?"); ?></label>
<?php echo CHtml::textField('googleanalyticsapikey',$esrow['googleanalyticsapikey'],array('size'=>20)) ?>
</li>

<li><label for='googleanalyticsstyle'><?php eT("Google Analytics style for this survey?"); ?></label>
<?php echo CHtml::dropDownList('googleanalyticsstyle', $esrow['googleanalyticsstyle'],array("0"=>gT("Do not use Google Analytics"),"1"=>gT("Default Google Analytics"),"2"=>gT("Survey name-[SID]/Group name"))); ?>
<?php echo CHtml::dropDownList('googleanalyticsstyle', $esrow['googleanalyticsstyle'],array("0"=>gT("Do not use Google Analytics",'unescaped'),"1"=>gT("Default Google Analytics",'unescaped'),"2"=>gT("Survey name-[SID]/Group name",'unescaped'))); ?>
</li>

</ul>
Expand Down
Expand Up @@ -3,7 +3,7 @@
<ul>
<li>
<label>&nbsp;</label>
<?php echo CHtml::dropDownList('type', 'files', array('files' => gT('Files'), 'flash' => gT('Flash'), 'images' => gT('Images'))); ?>
<?php echo CHtml::dropDownList('type', 'files', array('files' => gT('Files','unescaped'), 'flash' => gT('Flash','unescaped'), 'images' => gT('Images','unescaped'))); ?>
<input type='submit' value="<?php eT("Browse Uploaded Resources") ?>" />
</li>
<li>
Expand Down
16 changes: 8 additions & 8 deletions application/views/admin/token/browse.php
Expand Up @@ -155,21 +155,21 @@ function checkMandatoryAttr(value, colname) {

<div id="search">
<?php
$aOptionSearch = array('' => gT('Select...'));
$aOptionSearch = array('' => gT('Select...','unescaped'));
foreach($aTokenColumns as $sTokenColumn => $aTokenInformation)
{
if($aTokenInformation['search'])
{
$aOptionSearch[$sTokenColumn]=$aTokenInformation['description'];
}
}
$aOptionCondition = array('' => gT('Select...'),
'equal' => gT("Equals"),
'contains' => gT("Contains"),
'notequal' => gT("Not equal"),
'notcontains' => gT("Not contains"),
'greaterthan' => gT("Greater than"),
'lessthan' => gT("Less than"));
$aOptionCondition = array('' => gT('Select...','unescaped'),
'equal' => gT("Equals",'unescaped'),
'contains' => gT("Contains",'unescaped'),
'notequal' => gT("Not equal",'unescaped'),
'notcontains' => gT("Not contains",'unescaped'),
'greaterthan' => gT("Greater than",'unescaped'),
'lessthan' => gT("Less than",'unescaped'));
?>
<table id='searchtable'>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/token/csvupload.php
Expand Up @@ -33,7 +33,7 @@
<label class="col-sm-2 control-label" for='separator'><?php eT("Separator used:"); ?> </label>
<div class="col-sm-3">
<?php
$aSeparator = array('auto' => gT("(Autodetect)"), 'comma' => gT("Comma"), 'semicolon' => gT("Semicolon"));
$aSeparator = array('auto' => gT("(Autodetect)",'unescaped'), 'comma' => gT("Comma",'unescaped'), 'semicolon' => gT("Semicolon",'unescaped'));
echo CHtml::dropDownList('separator', returnGlobal('separator'), $aSeparator, array('size' => '1','class'=>'form-control'));
?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/token/invite.php
Expand Up @@ -107,7 +107,7 @@

<label class='control-label col-sm-2' for='bypassbademails'><?php eT("Bypass token with failing email addresses:"); ?></label>
<div class='col-sm-1'>
<?php echo CHtml::dropDownList('bypassbademails', 'Y',array("Y"=>gT("Yes"),"N"=>gT("No")), array('class' => 'form-control')); ?>
<?php echo CHtml::dropDownList('bypassbademails', 'Y',array("Y"=>gT("Yes",'unescaped'),"N"=>gT("No",'unescaped')), array('class' => 'form-control')); ?>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/token/managetokenattributes.php
Expand Up @@ -135,7 +135,7 @@
<p>
<label for="deleteattribute"><?php eT('Delete this attribute:'); ?></label>
<div class='col-sm-2'>
<?php echo CHtml::dropDownList('deleteattribute',"",CHtml::listData($tokenfieldlist,'id','descrition'),array('empty' => gT('none'), 'class'=>'form-control')); ?>
<?php echo CHtml::dropDownList('deleteattribute',"",CHtml::listData($tokenfieldlist,'id','descrition'),array('empty' => gT('(None)','unescaped'), 'class'=>'form-control')); ?>
</div>
</p>
<p>
Expand Down

0 comments on commit 435c127

Please sign in to comment.