<?php

use common\enums\GenderEnum;
use common\modules\attachment\widgets\SingleWidget;
use common\modules\city\widgets\CityWidget;
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

/**
 * @var yii\web\View $this
 * @var common\modules\user\models\User $user
 * @var common\modules\user\models\Profile $profile
 */

?>

<?php $this->beginContent(__DIR__ . '/update.php', ['user' => $user]) ?>

<?php $form = ActiveForm::begin(); ?>


<?= $form->field($profile, 'avatar')->widget(SingleWidget::className(), ['onlyUrl' => true]) ?>

<div class="form-group form-inline">
    <?= $form->field($profile, 'province')->textInput() ?>
    <?= $form->field($profile, 'city')->textInput() ?>
</div>

<?//= $form->field($profile, 'area')->label('所在地')->widget(CityWidget::className(), [
//    'provinceAttribute' => 'province',
//    'cityAttribute' => 'city',
//    'areaAttribute' => 'area'
//]) ?>

<?= $form->field($profile, 'gender')->dropDownList(GenderEnum::$list) ?>

<?= $form->field($profile, 'signature')->textarea() ?>
<?//= $form->field($profile, 'voice_id')->textInput() ?>

<div class="form-group">
    <?= Html::submitButton(Yii::t('app', 'Update'), ['class' => 'btn bg-maroon btn-flat btn-block']) ?>
</div>
<?php ActiveForm::end(); ?>

<?php $this->endContent() ?>
