re #25 allow rules edition + assignment

This commit is contained in:
Antonio Ramirez
2017-07-16 02:28:34 +02:00
parent f706ebb4fa
commit 84b009c5f0
17 changed files with 614 additions and 20 deletions

View File

@ -16,6 +16,7 @@
use Da\User\Helper\AuthHelper;
use dosamigos\selectize\SelectizeDropDownList;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
@ -33,7 +34,12 @@ $unassignedItems = Yii::$container->get(AuthHelper::class)->getUnassignedItems($
<?= $form->field($model, 'description') ?>
<?= $form->field($model, 'rule') ?>
<?= $form->field($model, 'rule')->widget(SelectizeDropDownList::class, [
'items' => ArrayHelper::map(Yii::$app->getAuthManager()->getRules(), 'name', 'name'),
'options' => [
'prompt' => 'Select rule...'
]
]) ?>
<?= $form->field($model, 'children')->widget(
SelectizeDropDownList::class,