add role to user
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user