Skip to content

Commit

Permalink
Revert "Develop merge 20181017 (#1146)" (#1147)
Browse files Browse the repository at this point in the history
This reverts commit aea8883.
  • Loading branch information
Shnoulle committed Oct 17, 2018
1 parent aea8883 commit 26684c1
Show file tree
Hide file tree
Showing 16 changed files with 224 additions and 287 deletions.
1 change: 0 additions & 1 deletion application/controllers/admin/tokens.php
Expand Up @@ -1361,7 +1361,6 @@ public function email($iSurveyId)
$to[] = ($emrow['firstname']." ".$emrow['lastname']." <{$sEmailaddress}>");
}

$fieldsarray["{SID}"] = $iSurveyId;
foreach ($emrow as $attribute => $value) {
$fieldsarray['{'.strtoupper($attribute).'}'] = $value;
}
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/update/updatedb_helper.php
Expand Up @@ -263,7 +263,7 @@ function db_upgrade_all($iOldDBVersion, $bSilent = false)
$aFailedTemplates=array();
// get each entry
while($entryName = readdir($hTemplateDirectory)) {
if (!in_array($entryName,array('.','..','.svn')) && is_dir($sStandardTemplateRootDir.DIRECTORY_SEPARATOR.$entryName) && !Template::isStandardTemplate($entryName))
if (!in_array($entryName,array('.','..','.svn')) && is_dir($sStandardTemplateRootDir.DIRECTORY_SEPARATOR.$entryName) && !isStandardTemplate($entryName))
{
if (!rename($sStandardTemplateRootDir.DIRECTORY_SEPARATOR.$entryName,$sUserTemplateRootDir.DIRECTORY_SEPARATOR.$entryName))
{
Expand Down
2 changes: 1 addition & 1 deletion application/models/Question.php
Expand Up @@ -485,7 +485,7 @@ public function getTypedesc()
* assessable : 0=Does not support assessment values when editing answerd 1=Support assessment values
* @deprecated use QuestionType::modelsAttributes() instead
*/
public static function typeList($language = null)
public static function typeList($language = '')
{
$questionTypes = QuestionType::modelsAttributes($language);

Expand Down
2 changes: 2 additions & 0 deletions application/third_party/pchart/pChart.class.php
Expand Up @@ -500,6 +500,8 @@ function drawScale($Data,$DataDescription,$ScaleMode,$R,$G,$B,$DrawTicks=TRUE,$A
if ( !isset($Divisions) )
$Divisions = 2;

if ($Scale == 1 && $Divisions%2 == 1)
$Divisions--;
}
else
$Divisions = $this->Divisions;
Expand Down
21 changes: 3 additions & 18 deletions application/views/admin/survey/Question/advanced_settings_view.php
Expand Up @@ -36,16 +36,12 @@
<div class="form-group">
<!-- Form Group -->
<!-- Label -->
<label class="control-label" for='<?php echo $aAttribute['name'];?>'>
<label class="control-label" for='<?php echo $aAttribute['name'];?>' title='<?php echo $aAttribute['help'];?>'>
<?php
echo $aAttribute['caption'];
if ($aAttribute['i18n']==true) { ?> (<?php echo $aAttribute['language'] ?>)<?php }
?>:
<a class="text-primary show-help" data-toggle="collapse" href="#help<?php echo $aAttribute['name'];?>" aria-expanded="false" aria-controls="help<?php echo $aAttribute['name'];?>" aria-hidden=true>
<span class="fa fa-info-circle" ></span>
</a>
</label>
<p class="help-block collapse" id="help<?php echo $aAttribute['name'];?>"><?php echo $aAttribute['help'];?></p>

<!-- Input -->
<div class="">
Expand All @@ -62,7 +58,6 @@
'offLabel'=>gT('Off'),
'htmlOptions'=>array(
'disabled'=>$readonly,
'aria-describedby'=>"help{$aAttribute['name']}",
),
));
break;
Expand All @@ -74,7 +69,6 @@
'selectOptions'=>$aAttribute['options'],
'htmlOptions'=>array(
'disabled'=>$readonly,
'aria-describedby'=>"help{$aAttribute['name']}",
),
));
break;
Expand All @@ -84,7 +78,6 @@
'class'=>"form-control",
'disabled'=>$readonly,
'encode'=>false, // gt encode it by default
'aria-describedby'=>"help{$aAttribute['name']}",
));
break;
// Text
Expand All @@ -96,7 +89,6 @@
echo CHtml::textField($aAttribute['name'],$aAttribute['value'],array(
'class'=>"form-control",
'disabled'=>$readonly,
'aria-describedby'=>"help{$aAttribute['name']}",
));
if($aAttribute['expression']>=2) {
echo CHtml::tag('div',array('class'=>"input-group-addon"),"}");
Expand All @@ -112,8 +104,7 @@
'step'=>1,
'pattern'=>'\d+',
'min'=>(isset($aAttribute['min'])?$aAttribute['min']:1),
'max'=>(isset($aAttribute['max'])?$aAttribute['max']:null),
'aria-describedby'=>"help{$aAttribute['name']}",
'max'=>(isset($aAttribute['max'])?$aAttribute['max']:null)
));
break;

Expand All @@ -138,8 +129,7 @@
'step'=>1,
'pattern'=>'\d+',
'min'=>1,
'max'=>12,
'aria-describedby'=>"help{$aAttribute['name']}",
'max'=>12
));
break;
// Textarea
Expand All @@ -151,7 +141,6 @@
echo CHtml::textArea($aAttribute['name'],$aAttribute['value'],array(
'class'=>"form-control",
'disabled'=>$readonly,
'aria-describedby'=>"help{$aAttribute['name']}",
));
if ($aAttribute['expression']>=2) {
echo CHtml::tag('div',array('class'=>"input-group-addon"),"}");
Expand All @@ -164,7 +153,6 @@
echo CHtml::dropDownList($aAttribute['name'],$aAttribute['value'],$aQuestionTemplates,array(
'class'=>"form-control",
'disabled'=>$readonly,
'aria-describedby'=>"help{$aAttribute['name']}",
));
break;

Expand All @@ -178,11 +166,8 @@
/* Launch all needed script (here after load) needed for widget */
foreach (Yii::app()->clientScript->scripts as $index=>$script)
{
// Add specific view script
$script[] = "$('.show-help').tooltip({ html:true, title : function() { return $($(this).attr('href')).html(); }, trigger: 'hover' });";
echo CHtml::script(implode("\n",$script));
}
Yii::app()->clientScript->reset();
?>

<!-- end of Advanced Settings -->

0 comments on commit 26684c1

Please sign in to comment.