Exemplo n.º 1
0
echo $form->field('id')->hiddenInput();
?>
                <?php 
echo $form->field('username')->textInput(['placeholder' => Module::t('user.username')]);
?>
                <?php 
echo $form->field('password')->passwordInput(['placeholder' => Module::t('user.password')]);
?>
                <?php 
echo $form->field('name')->textInput(['placeholder' => Module::t('user.name')]);
?>
                <?php 
echo Checkbox::widget(['name' => 'role', 'label' => Module::t('role.list.title'), 'items' => $data['roles']]);
?>
                <?php 
echo Radio::widget(['name' => 'status', 'label' => Module::t('status'), 'items' => $data['status'], 'values' => [1]]);
?>

                <?php 
ActiveForm::end();
?>
            </div>
        </div>
    </div>
</div>
<?php 
Modal::end();
?>
    <script type="text/javascript">
        _callbacks.push(function() {
            user.init();
                <div class="form-group">
                    <label class="control-label control-label"><?php 
echo Module::t('role.list.title');
?>
</label>
                    <?php 
echo Checkbox::widget(['name' => 'role', 'items' => $data['roles']]);
?>
                </div>
                <div class="form-group">
                    <label class="control-label control-label"><?php 
echo Module::t('status');
?>
</label>
                    <?php 
echo Radio::widget(['name' => 'status', 'items' => $data['status'], 'values' => [1]]);
?>
                </div>



                <?php 
ActiveForm::end();
?>
            </div>
        </div>
    </div>
</div>
<?php 
Modal::end();
?>
echo $form->field('parent_id')->hiddenInput(['value' => 1]);
?>
                <?php 
echo $form->field('name')->textInput(['placeholder' => Module::t('name')]);
?>
                <?php 
echo $form->field('link')->textInput(['placeholder' => Module::t('link'), 'value' => '#']);
?>

                <div class="form-group">
                    <label class="control-label control-label"><?php 
echo Module::t('navigation');
?>
</label>
                    <?php 
echo Radio::widget(['name' => 'is_nav', 'items' => [\liuxy\admin\models\Permission::NAV_YES => Module::t('yes'), \liuxy\admin\models\Permission::NAV_NO => Module::t('no')], 'values' => [\liuxy\admin\models\Permission::NAV_NO]]);
?>
                </div>


                <?php 
echo $form->field('description')->textInput(['placeholder' => Module::t('description')]);
?>
                <?php 
echo $form->field('icon')->textInput(['placeholder' => Module::t('description'), 'value' => 'icon-list', 'icon' => 'ace-icon fa fa-external-link', 'icon-link' => 'http://fontawesome.io/icons/', 'typehead' => true]);
?>
                <?php 
ActiveForm::end();
?>
            </div>
        </div>
Exemplo n.º 4
0
            <div class="portlet-body form">

                <?php 
$form = ActiveForm::begin(['id' => 'perm-form']);
?>
                <?php 
echo $form->field('parent_id')->hiddenInput(['value' => 1]);
?>
                <?php 
echo $form->field('name')->textInput(['placeholder' => Module::t('name')]);
?>
                <?php 
echo $form->field('link')->textInput(['placeholder' => Module::t('link'), 'value' => '#']);
?>
                <?php 
echo Radio::widget(['name' => 'is_nav', 'label' => Module::t('navigation'), 'labelOptions' => ['class' => 'col-md-3'], 'items' => [\liuxy\admin\models\Permission::NAV_YES => Module::t('yes'), \liuxy\admin\models\Permission::NAV_NO => Module::t('no')], 'values' => [\liuxy\admin\models\Permission::NAV_NO]]);
?>
                <?php 
echo $form->field('description')->textInput(['placeholder' => Module::t('description')]);
?>
                <?php 
echo $form->field('icon')->textInput(['placeholder' => Module::t('description'), 'value' => 'icon-list', 'icon' => 'ace-icon fa fa-external-link', 'icon-link' => 'http://fontawesome.io/icons/', 'typehead' => true]);
?>
                <?php 
ActiveForm::end();
?>
            </div>
        </div>
    </div>
</div>
<?php