_form.php 689 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /*
  5. * @var yii\web\View $this
  6. * @var rbac\models\AuthItem $model
  7. * @var yii\widgets\ActiveForm $form
  8. */
  9. ?>
  10. <div class="auth-item-form">
  11. <?php $form = ActiveForm::begin(); ?>
  12. <?= $form->field($model, 'name')->textInput(['maxlength' => 64]) ?>
  13. <?= $form->field($model, 'className')->textInput() ?>
  14. <div class="form-group">
  15. <?php
  16. echo Html::submitButton($model->isNewRecord ? Yii::t('rbac', 'Create') : Yii::t('rbac', 'Update'), [
  17. 'class' => $model->isNewRecord ? 'btn btn-success btn-flat' : 'btn btn-primary btn-flat', ])
  18. ?>
  19. </div>
  20. <?php ActiveForm::end(); ?>
  21. </div>