add role to user

This commit is contained in:
2015-11-05 09:26:08 +01:00
parent bdd5a94b3f
commit 43d5598f23
9 changed files with 151 additions and 17 deletions

View File

@@ -3,15 +3,21 @@
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\grid\GridView;
use yii\base\Widget;
use yii\base\Object;
use yii\data\ArrayDataProvider;
use common\components\RoleDefinition;
/* @var $this yii\web\View */
/* @var $model common\models\User */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
$roleOptions = RoleDefinition::roleLabels();
asort($roleOptions);
?>
<div class="user-form">
<?php $form = ActiveForm::begin(); ?>
@@ -21,6 +27,7 @@ use yii\data\ArrayDataProvider;
<?= $form->field($model, 'email')->textInput() ?>
<?= $form->field($model, 'password_plain')->passwordInput() ?>
<?= $form->field($model, 'password_repeat')->passwordInput() ?>
<?= $form->field($model, 'role')->dropDownList($roleOptions) ?>
<?php