account.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. <div class="panel panel-primary">
  21. <div class="panel-heading"><span class="glyphicon glyphicon-flash"></span><strong> Зміна пароля</strong></div>
  22. <div class="panel-body">
  23. <?= $this->render('/_alert', ['module' => Yii::$app->getModule('user')]) ?>
  24. <?php $form = ActiveForm::begin([
  25. 'id' => 'account-form',
  26. 'options' => ['class' => 'form-horizontal'],
  27. 'fieldConfig' => [
  28. 'template' => "{label}\n<div class=\"col-lg-4\">{input}</div>\n<div class=\"col-sm-offset-2 col-lg-1\">{error}\n{hint}</div>",
  29. 'labelOptions' => ['class' => 'col-lg-4 control-label'],
  30. ],
  31. 'enableAjaxValidation' => true,
  32. 'enableClientValidation' => false,
  33. ]); ?>
  34. <?= $form->field($model, 'current_password')->passwordInput() ?>
  35. <?= $form->field($model, 'new_password')->passwordInput() ?>
  36. <div class="form-group">
  37. <div class="col-lg-offset-4 col-lg-4">
  38. <?= Html::submitButton(Yii::t('user', 'Save'), ['class' => 'btn btn-block btn-success']) ?><br>
  39. </div>
  40. </div>
  41. <?php ActiveForm::end(); ?>
  42. </div></div>