Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LimeSurvey/LimeSurvey
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Feb 22, 2016
2 parents 2251e2c + 40a6c87 commit 109179b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
7 changes: 4 additions & 3 deletions application/controllers/admin/useraction.php
Expand Up @@ -314,8 +314,10 @@ function deleteFinalUser($result, $transfer_surveys_to)
*/
function modifyuser()
{
if (isset($_POST['uid'])) {
$postuserid = (int) Yii::app()->request->getPost("uid");

if ( Yii::app()->request->getParam('uid') !='' )
{
$postuserid = (int) Yii::app()->request->getParam("uid");
$sresult = User::model()->findAllByAttributes(array('uid' => $postuserid, 'parent_id' => Yii::app()->session['loginID']));
$sresultcount = count($sresult);

Expand All @@ -338,7 +340,6 @@ function modifyuser()
$this->getController()->redirect(array("admin/user/sa/index"));
}
}
Yii::app()->setFlashMessage(gT("You do not have sufficient rights to access this page."),'error');
$this->getController()->redirect(array("admin/user/sa/index"));
}

Expand Down
8 changes: 6 additions & 2 deletions application/helpers/qanda_helper.php
Expand Up @@ -3153,6 +3153,7 @@ function do_multiplenumeric($ia)
{
foreach($aSubquestions as $ansrow)
{
$labelText = $ansrow['question'];
$myfname = $ia[1].$ansrow['title'];
if ($ansrow['question'] == "") {$ansrow['question'] = " ";}
if ($slider_layout === false || $slider_separator == '')
Expand All @@ -3164,12 +3165,15 @@ function do_multiplenumeric($ia)
{
$aAnswer=explode($slider_separator,$ansrow['question']);
$theanswer=(isset($aAnswer[0]))?$aAnswer[0]:"";
$labelText=$theanswer;
$sliderleft=(isset($aAnswer[1]))?$aAnswer[1]:"";
$sliderright=(isset($aAnswer[2]))?$aAnswer[2]:"";
$sliders = true;
$sliderright="<div class=\"slider_righttext\">$sliderright</div>";
//$sliderright="<span class=\"slider_righttext\">$sliderright</span>";
}

/*$prefix = (isset($sliderleft))?$sliderleft:$prefix;
$suffix = (isset($sliderright))?$sliderright:$suffix;*/
$aAnswer=(isset($aAnswer))?$aAnswer:'';
$sliderleft=(isset($sliderleft))?$sliderleft:"";
$sliderright=(isset($sliderright))?$sliderright:"";
Expand Down Expand Up @@ -3220,7 +3224,7 @@ function do_multiplenumeric($ia)
'myfname'=>$myfname,
'dispVal'=>$dispVal,
'maxlength'=>$maxlength,
'labelText'=>$ansrow['question'],
'labelText'=>$labelText,
'checkconditionFunction'=>$checkconditionFunction.'(this.value, this.name, this.type)',
'slider_orientation' => $slider_orientation,
'slider_step' => $slider_step ,
Expand Down
6 changes: 6 additions & 0 deletions application/views/admin/super/adminmenu.php
Expand Up @@ -104,11 +104,17 @@

</ul>
</li>

<!-- user menu -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" ><?php echo Yii::app()->session['user'];?> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">

<!-- Edit your profile -->
<li>
<a href="<?php echo $this->createUrl("/admin/user/sa/modifyuser/uid/".Yii::app()->user->getId()); ?>"><?php eT("Edit your profile");?></a>
</li>

<!-- Edit your personal preferences -->
<li>
<a href="<?php echo $this->createUrl("/admin/user/sa/personalsettings"); ?>"><?php eT("Edit your personal preferences");?></a>
Expand Down
3 changes: 2 additions & 1 deletion application/views/survey/questions/multiplenumeric/item.php
Expand Up @@ -23,7 +23,6 @@
<div class="alert alert-danger errormandatory" role="alert">
<?php echo $labelText;?>
</div> <!-- alert -->

<?php endif;?>
<div class="form-group-row row">
<label class='control-label col-xs-12' for="answer<?php echo $myfname; ?>">
Expand All @@ -32,6 +31,7 @@
<br/><br/><br/>
<div class="col-xs-12 input">
<?php echo $prefix;?>
<?php echo $sliderleft;?>
<?php if(!$sliders): ?>
<input
class="text form-control <?php echo $kpclass;?>"
Expand Down Expand Up @@ -62,6 +62,7 @@ class="text form-control <?php echo $kpclass;?>"
data-slider-tooltip='always'
/>
<?php endif;?>
<?php echo $sliderright;?>
<?php echo $suffix;?>
</div> <!-- xs-12 -->
</div> <!-- form group -->
Expand Down

0 comments on commit 109179b

Please sign in to comment.