Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into cint
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Jul 27, 2016
2 parents dc66298 + cf0c793 commit aeae6a7
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 86 deletions.
1 change: 0 additions & 1 deletion application/controllers/admin/useraction.php
Expand Up @@ -680,7 +680,6 @@ public function personalsettings()
'full_name'=> Yii::app()->request->getPost('fullname'),
'email'=> Yii::app()->request->getPost('email')
);
$sPassword=Yii::app()->request->getPost('password');
if (Yii::app()->request->getPost('password')!='')
{
if (Yii::app()->request->getPost('password')==Yii::app()->request->getPost('repeatpassword'))
Expand Down
14 changes: 9 additions & 5 deletions application/models/AdminTheme.php
Expand Up @@ -133,12 +133,16 @@ public function registerStylesAndScripts()
// and move the rest to the bootstrap package.
// NB: registerAllScripts could be replaced by js definition in package. If needed: not a problem to do it

Yii::app()->getClientScript()->registerMetaTag('width=device-width, initial-scale=1.0', 'viewport'); // See: https://github.com/LimeSurvey/LimeSurvey/blob/master/application/extensions/bootstrap/components/TbApi.php#l108-l115
App()->bootstrap->registerAllScripts(); // See : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/extensions/bootstrap/components/TbApi.php#l153-l160
if (!Yii::app()->request->isAjaxRequest)
{
Yii::app()->getClientScript()->registerMetaTag('width=device-width, initial-scale=1.0', 'viewport'); // See: https://github.com/LimeSurvey/LimeSurvey/blob/master/application/extensions/bootstrap/components/TbApi.php#l108-l115
App()->bootstrap->registerAllScripts(); // See : https://github.com/LimeSurvey/LimeSurvey/blob/master/application/extensions/bootstrap/components/TbApi.php#l153-l160

App()->getClientScript()->registerPackage('jqueryui'); // jqueryui
App()->getClientScript()->registerPackage('jquery-cookie'); // jquery-cookie
App()->getClientScript()->registerPackage('fontawesome'); // fontawesome ??? TODO: check if needed
App()->getClientScript()->registerPackage('jqueryui'); // jqueryui
App()->getClientScript()->registerPackage('jquery-cookie'); // jquery-cookie
App()->getClientScript()->registerPackage('fontawesome'); // fontawesome ??? TODO: check if needed

}

$aCssFiles = array();
$aJsFiles= array();
Expand Down
18 changes: 16 additions & 2 deletions application/views/admin/super/adminmenu.php
Expand Up @@ -150,8 +150,22 @@
</li>
<?php endforeach; ?>

<li>
<a href="<?php echo $this->createUrl("/admin/user/sa/personalsettings"); ?>" role="button" ><span class="icon-user" ></span> <?php echo Yii::app()->session['user'];?> </a>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" ><span class="icon-user" ></span> <?php echo Yii::app()->session['user'];?> <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li>
<a href="<?php echo $this->createUrl("/admin/user/sa/personalsettings"); ?>"><?php eT("Your account");?></a>
</li>

<li class="divider"></li>

<!-- Logout -->
<li>
<a href="<?php echo $this->createUrl("admin/authentication/sa/logout"); ?>">
<?php eT("Logout");?>
</a>
</li>
</ul>
</li>
</ul>
</div><!-- /.nav-collapse -->
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/user/personalsettings.php
Expand Up @@ -13,7 +13,7 @@
<?php echo CHtml::textField('username', $sUsername,array('class'=>'form-control','readonly'=>'readonly')); ?>
</div>
<div class="col-sm-3">
<span class='annotation'><?php eT("The user name cannot be changed."); ?></span>
<span class='text-info'><?php eT("The user name cannot be changed."); ?></span>
</div>
</div>
<div class="form-group">
Expand Down

0 comments on commit aeae6a7

Please sign in to comment.