account.php 2.0 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\helpers\Html;
  11. use yii\bootstrap4\ActiveForm;
  12. /**
  13. * @var yii\web\View $this
  14. * @var yii\widgets\ActiveForm $form
  15. * @var dektrium\user\models\SettingsForm $model
  16. */
  17. $this->title = Yii::t('user', 'Account settings');
  18. $this->params['breadcrumbs'][] = ['label' => 'Профіль', 'url' => ['index']];
  19. $this->params['breadcrumbs'][] = $this->title;
  20. ?>
  21. <? //echo $this->render('@app/views/user/_alert', ['module' => Yii::$app->getModule('user')]) ?>
  22. <!-- Profile Box -->
  23. <div class="card card-gray">
  24. <div class="card-header">
  25. <h3 class="card-title"><?= Html::encode($this->title) ?></h3>
  26. <div class="card-tools"><span data-toggle="tooltip" title="Номер договору" class="badge bg-white"># </span></div>
  27. </div>
  28. <div class="card-body box-profile">
  29. <?php $form = ActiveForm::begin([
  30. 'id' => 'account-form',
  31. 'options' => ['class' => 'form-horizontal'],
  32. 'fieldConfig' => [
  33. 'template' => "{label}\n<div class=\"col-lg-9\">{input}</div>\n<div class=\"col-sm-offset-3 col-lg-9\">{error}\n{hint}</div>",
  34. 'labelOptions' => ['class' => 'col-lg-3 control-label'],
  35. ],
  36. 'enableAjaxValidation' => true,
  37. 'enableClientValidation' => false,
  38. ]); ?>
  39. <?= $form->field($model, 'email') ?>
  40. <?/*= $form->field($model, 'username') */?>
  41. <?= $form->field($model, 'new_password')->passwordInput() ?>
  42. <hr/>
  43. <?= $form->field($model, 'current_password')->passwordInput() ?>
  44. <div class="form-group">
  45. <div class="col-lg-offset-3 col-lg-9">
  46. <?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-block btn-success']) ?>
  47. </div>
  48. </div>
  49. <?php ActiveForm::end(); ?>
  50. </div>
  51. </div>