Drupal investigation

settings.php 1.2KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /* @var $this yii\web\View */
  5. /* @var $model app\models\TestUsers */
  6. /* @var $form ActiveForm */
  7. /* @var $model app\models\UpdateForm */
  8. ?>
  9. <div class="site-account">
  10. <h1><?= Yii::t('app', 'My profile')?></h1>
  11. <h3> <?= Yii::$app->user->identity->forename.' '.Yii::$app->user->identity->surname ?></h3>
  12. <h3>Username: <?= Yii::$app->user->identity->username ?></h3>
  13. <?php if(Yii::$app->session->hasFlash('success')){
  14. echo '<div class="alert alert-success" role="alert">'.Yii::$app->session->getFlash('success').'</div>';
  15. }
  16. ?>
  17. <?php $form = ActiveForm::begin(); ?>
  18. <?= $form->field($model, 'email')->textInput(['value'=>Yii::$app->user->identity->email])->label(Yii::t('app', 'Email'))?>
  19. <?= $form->field($model, 'phone')->textInput(['value'=>Yii::$app->user->identity->phone])->label(Yii::t('app', 'Phone'))?>
  20. <?= $form->field($model, 'lang')->dropdownList($languages)->label(Yii::t('app', 'Language')) ?>
  21. <div class="form-group">
  22. <?= Html::submitButton(Yii::t('app', 'Submit'), ['class' => 'btn btn-success']) ?>
  23. </div>
  24. <?php ActiveForm::end(); ?>
  25. </div><!-- site-account -->