profile.php 2.3 KB

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