mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
UserSettingMenu in authentication settings
This commit is contained in:
parent
dcd41d049d
commit
5baf8b8e62
@ -35,7 +35,8 @@
|
||||
"bower-asset/bootstrap-markdown": "2.10.*",
|
||||
"bower-asset/select2" : "^4.0.2",
|
||||
"bower-asset/bluebird" : "^3.3.5",
|
||||
"bower-asset/select2-bootstrap-theme" : "0.1.0-beta.4"
|
||||
"bower-asset/select2-bootstrap-theme" : "0.1.0-beta.4",
|
||||
"jonnyw/php-phantomjs": "4.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"yiisoft/yii2-codeception": "*",
|
||||
@ -51,6 +52,12 @@
|
||||
"scripts": {
|
||||
"post-create-project-cmd": [
|
||||
"yii\\composer\\Installer::postCreateProject"
|
||||
],
|
||||
"post-install-cmd": [
|
||||
"PhantomInstaller\\Installer::installPhantomJS"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"PhantomInstaller\\Installer::installPhantomJS"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
|
@ -3,23 +3,11 @@
|
||||
use yii\widgets\ActiveForm;
|
||||
use humhub\compat\CHtml;
|
||||
use humhub\models\Setting;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo Yii::t('AdminModule.views_setting_authentication', '<strong>Authentication</strong> - Basic'); ?></div>
|
||||
<div class="panel-body">
|
||||
|
||||
<ul class="nav nav-pills">
|
||||
<li class="active"><a
|
||||
href="<?php echo Url::toRoute('authentication'); ?>"><?php echo Yii::t('AdminModule.views_setting_authentication', 'Basic'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo Url::toRoute('authentication-ldap'); ?>"><?php echo Yii::t('AdminModule.views_setting_authentication', 'LDAP'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<br/>
|
||||
<?= \humhub\modules\admin\widgets\UserSettingMenu::widget([]) ?>
|
||||
|
||||
<?php $form = ActiveForm::begin(['id' => 'authentication-settings-form']); ?>
|
||||
|
||||
|
@ -3,22 +3,12 @@
|
||||
use yii\widgets\ActiveForm;
|
||||
use humhub\compat\CHtml;
|
||||
use humhub\models\Setting;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><?php echo Yii::t('AdminModule.views_setting_authentication_ldap', '<strong>Authentication</strong> - LDAP'); ?></div>
|
||||
<div class="panel-body">
|
||||
|
||||
<ul class="nav nav-pills">
|
||||
<li>
|
||||
<a href="<?php echo Url::toRoute('authentication'); ?>"><?php echo Yii::t('AdminModule.views_setting_authentication_ldap', 'Basic'); ?></a>
|
||||
</li>
|
||||
<li class="active"><a
|
||||
href="<?php echo Url::toRoute('authentication-ldap'); ?>"><?php echo Yii::t('AdminModule.views_setting_authentication_ldap', 'LDAP'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<br/>
|
||||
<?= \humhub\modules\admin\widgets\UserSettingMenu::widget([]) ?>
|
||||
|
||||
<?php if ($enabled): ?>
|
||||
<?php if ($errorMessage != ""): ?>
|
||||
|
44
protected/humhub/modules/admin/widgets/UserSettingMenu.php
Normal file
44
protected/humhub/modules/admin/widgets/UserSettingMenu.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @link https://www.humhub.org/
|
||||
* @copyright Copyright (c) 2015 HumHub GmbH & Co. KG
|
||||
* @license https://www.humhub.com/licences
|
||||
*/
|
||||
|
||||
namespace humhub\modules\admin\widgets;
|
||||
|
||||
use Yii;
|
||||
use yii\helpers\Url;
|
||||
|
||||
/**
|
||||
* User Administration Menu
|
||||
*
|
||||
* @author Basti
|
||||
*/
|
||||
class UserSettingMenu extends \humhub\widgets\BaseMenu
|
||||
{
|
||||
|
||||
public $template = "@humhub/widgets/views/tabMenu";
|
||||
public $type = "adminUserSettingNavigation";
|
||||
|
||||
public function init()
|
||||
{
|
||||
|
||||
$this->addItem(array(
|
||||
'label' => Yii::t('AdminModule.views_setting_authentication', 'General'),
|
||||
'url' => Url::toRoute(['/admin/setting/authentication']),
|
||||
'sortOrder' => 100,
|
||||
'isActive' => (Yii::$app->controller->module && Yii::$app->controller->module->id == 'admin' && Yii::$app->controller->id == 'settings' && Yii::$app->controller->action->id == 'authentication'),
|
||||
));
|
||||
$this->addItem(array(
|
||||
'label' => Yii::t('AdminModule.views_setting_authentication', 'LDAP'),
|
||||
'url' => Url::toRoute(['/admin/setting/authentication-ldap']),
|
||||
'sortOrder' => 200,
|
||||
'isActive' => (Yii::$app->controller->module && Yii::$app->controller->module->id == 'admin' && Yii::$app->controller->id == 'settings' && Yii::$app->controller->action->id == 'authentication-ldap'),
|
||||
));
|
||||
|
||||
parent::init();
|
||||
}
|
||||
|
||||
}
|
4
protected/humhub/modules/user/tests/codeception/_output/.gitignore
vendored
Normal file
4
protected/humhub/modules/user/tests/codeception/_output/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
@ -1,2 +1,4 @@
|
||||
# Ignore everything in this directory
|
||||
*
|
||||
# Except this file
|
||||
!.gitignore
|
Loading…
x
Reference in New Issue
Block a user