create.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. /*
  3. * This file is part of the Dektrium project.
  4. *
  5. * (c) Dektrium project <http://github.com/dektrium>
  6. *
  7. * For the full copyright and license information, please view the LICENSE.md
  8. * file that was distributed with this source code.
  9. */
  10. use yii\bootstrap\ActiveForm;
  11. use yii\bootstrap\Nav;
  12. use yii\helpers\Html;
  13. /**
  14. * @var yii\web\View $this
  15. * @var dektrium\user\models\User $user
  16. */
  17. $this->title = '新建用户';
  18. $this->params['breadcrumbs'][] = ['label' => '用户', 'url' => ['index']];
  19. $this->params['breadcrumbs'][] = $this->title;
  20. ?>
  21. <div class="row">
  22. <div class="col-md-3">
  23. <div class="panel panel-default">
  24. <div class="panel-body">
  25. <?= Nav::widget([
  26. 'options' => [
  27. 'class' => 'nav-pills nav-stacked',
  28. ],
  29. 'items' => [
  30. ['label' => Yii::t('app', 'Account details'), 'url' => ['/user/admin/create']],
  31. ['label' => Yii::t('app', 'Profile details'), 'options' => [
  32. 'class' => 'disabled',
  33. 'onclick' => 'return false;',
  34. ]],
  35. ],
  36. ]) ?>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="col-md-9">
  41. <div class="panel panel-default">
  42. <div class="panel-body">
  43. <div class="alert alert-info">
  44. 默认密码 111111
  45. </div>
  46. <?php $form = ActiveForm::begin(); ?>
  47. <?= $this->render('_user', ['form' => $form, 'user' => $user]) ?>
  48. <div class="form-group">
  49. <?= Html::submitButton( '创建', ['class' => 'btn bg-maroon btn-flat btn-block']) ?>
  50. </div>
  51. <?php ActiveForm::end(); ?>
  52. </div>
  53. </div>
  54. </div>
  55. </div>