2amigos / yii2-usuario

Highly customizable and extensible user management, authentication, and authorization Yii2 extension
https://github.com/2amigos/yii2-usuario
Other
294 stars 142 forks source link

Add information about create rule #277

Open bscheshirwork opened 6 years ago

bscheshirwork commented 6 years ago

What steps will reproduce the problem?

No one info on form

What is the expected result?

something like

<?php

/*
 * This file is part of the 2amigos/yii2-usuario project.
 *
 * (c) 2amigOS! <http://2amigos.us/>
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

/**
 * @var \Da\User\Model\Role $model
 * @var $this               yii\web\View
 * @var $unassignedItems    string[]
 */
$this->title = Yii::t('usuario', 'Create new rule');
$this->params['breadcrumbs'][] = $this->title;

?>

<?php $this->beginContent('@Da/User/resources/views/shared/admin_layout.php') ?>

<?= yii\bootstrap\Alert::widget(
    [
        'options' => [
            'class' => 'alert-info alert-dismissible',
        ],
        'body' => Yii::t('usuario', 'You must create the rule class first.'),
    ]
) ?>

<?= $this->render(
    '/rule/_form',
    [
        'model' => $model,
    ]
) ?>

<?php $this->endContent() ?>

What do you get instead?

https://github.com/2amigos/yii2-usuario/blob/5181bbc60a2c72aa37344a260e39cd6f6211a803/src/User/resources/views/rule/create.php#L22-L31

tonydspaniard commented 6 years ago

@bscheshirwork That was done purposely, the forms provided are simply an example skeleton. In all the applications we have created we were forced to modify the design. You simply need to override the views.