added RBAC

This commit is contained in:
Antonio Ramirez
2016-12-14 02:26:02 +01:00
parent 9409da4c89
commit 9f1a60b542
43 changed files with 1625 additions and 245 deletions

View File

@ -0,0 +1,36 @@
<?php
/**
* @var $this yii\web\View
* @var $model \Da\User\Model\Permission
* @var $unassignedItems string[]
*/
use kartik\select2\Select2;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
?>
<?php $form = ActiveForm::begin([
'enableClientValidation' => false,
'enableAjaxValidation' => true,
]) ?>
<?= $form->field($model, 'name') ?>
<?= $form->field($model, 'description') ?>
<?= $form->field($model, 'rule') ?>
<?= $form->field($model, 'children')->widget(Select2::className(), [
'data' => $unassignedItems,
'options' => [
'id' => 'children',
'multiple' => true
],
]) ?>
<?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-success btn-block']) ?>
<?php ActiveForm::end() ?>