You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

59 lines
1.8 KiB

<?php
/* @var $this yii\web\View */
/* @var $model \core\forms\user\ProfileEditForm */
/* @var $user \core\entities\user\User */
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
$this->title = Yii::t('user', 'Profile: {username}', ['username' => $user->username]);
$this->params['breadcrumbs'][] = ['label' => $user->username, 'url' => ['view', 'id' => $user->id]];
$this->params['breadcrumbs'][] = Yii::t('user', 'Profile');
?>
<div class="user-profile">
<?php $form = ActiveForm::begin(); ?>
<div class="row">
<div class="col-md-3">
<div class="box box-default">
<div class="box-body">
<div style="text-align: center">
<img style="width: 300px" src="<?= Yii::$app->avatar->show(Yii::$app->user->identity->user->username, null, null, Yii::$app->user->identity->user->user_pic) ?>?<?= rand(10, 5000) ?>" class="img-circle" alt="<?= Yii::$app->user->identity->user->username ?>"/>
</div>
<!-- < ?= $form->field($model, 'user_pic')->fileInput() ?> -->
<?= $form->field($model, 'user_pic')->widget(\kartik\widgets\FileInput::class, [
'options' => [
'accept' => 'image/*'
],
'pluginOptions' => [
'showPreview' => false,
'showCaption' => true,
'showRemove' => true,
'showUpload' => false
],
]); ?>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box box-default">
<div class="box-body">
<?= $form->field($model, 'username')->textInput(['maxLength' => true]) ?>
<?= $form->field($model, 'email')->textInput(['maxLength' => true]) ?>
<?= $form->field($model, 'password')->passwordInput(['maxLength' => true]) ?>
</div>
</div>
</div>
</div>
<div class="form-group">
<?= Html::submitButton(Yii::t('buttons', 'Save'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>