account.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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\helpers\Html;
  11. use yii\widgets\ActiveForm;
  12. /*
  13. * @var $this yii\web\View
  14. * @var $form yii\widgets\ActiveForm
  15. * @var $model dektrium\user\models\SettingsForm
  16. */
  17. $this->title = Yii::t('user', 'Account settings');
  18. $this->params['breadcrumbs'][] = $this->title;
  19. ?>
  20. <?= $this->render('/_alert', ['module' => Yii::$app->getModule('user')]) ?>
  21. <div class="row">
  22. <div class="col-md-3">
  23. <?= $this->render('_menu') ?>
  24. </div>
  25. <div class="col-md-9">
  26. <div class="panel panel-default">
  27. <div class="panel-heading">
  28. <?= Html::encode($this->title) ?>
  29. </div>
  30. <div class="panel-body">
  31. <?php $form = ActiveForm::begin([
  32. 'id' => 'account-form',
  33. 'options' => ['class' => 'form-horizontal'],
  34. 'fieldConfig' => [
  35. 'template' => "{label}\n<div class=\"col-lg-9\">{input}</div>\n<div class=\"col-sm-offset-3 col-lg-9\">{error}\n{hint}</div>",
  36. 'labelOptions' => ['class' => 'col-lg-3 control-label'],
  37. ],
  38. 'enableAjaxValidation' => true,
  39. 'enableClientValidation' => false,
  40. ]); ?>
  41. <?= $form->field($model, 'email') ?>
  42. <?= $form->field($model, 'username') ?>
  43. <?= $form->field($model, 'new_password')->passwordInput() ?>
  44. <hr />
  45. <?= $form->field($model, 'current_password')->passwordInput() ?>
  46. <div class="form-group">
  47. <div class="col-lg-offset-3 col-lg-9">
  48. <?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-block btn-success']) ?><br>
  49. </div>
  50. </div>
  51. <?php ActiveForm::end(); ?>
  52. </div>
  53. </div>
  54. </div>
  55. </div>