<?php
use yii\helpers\Url;
use common\models\User;
use yii\widgets\ActiveForm;
use qcbase\models\Auth;
use yii\helpers\Html;

/* @var $this yii\web\View */

$form = ActiveForm::begin([
        'id' => 'main-form',
        'action' =>  [$this->context->id.'/info'] ,
        'fieldConfig' => [
            'options' => ['tag' => 'tr'],
            'template' => "<th width='120'>{label}</th><td>{input}{hint}{error}</td>",
        ]
    ]);
?>

<div class="h_a">个人信息</div>
<div class="table_full">
    <table width="100%">
        <tr class="field-user-username required">
            <th width="120" >
                <label class="control-label" for="user-username" >用户名</label>
            </th>
            <td>
                <?= Html::encode($model->username); ?>
            </td>
        </tr>
        <?= $form->field($model, 'realname')->textInput(['class' => 'input length_5', 'placeholder' => '真实姓名']); ?>
        <?= $form->field($model, 'email')->textInput(['class' => 'input length_5', 'placeholder' => '邮箱']); ?>
        <?= $form->field($model, 'gender')->radioList(User::getGenderList(), ['class' => 'switch_list']) ?>
        <?= $form->field($model->info, 'phone')->textInput(['class' => 'input length_5', 'placeholder' => '手机']); ?>
        <?= $form->field($model->info, 'qq')->textInput(['class' => 'input length_5', 'placeholder' => 'qq']); ?>
        <?= $form->field($model->info, 'remark')->textarea(['style' => 'width:290px']) ?>
    </table>
</div>

<div class="btn_wrap">
    <div class="btn_wrap_pd">
        <?= Html::submitButton('提交', ['class' => 'btn btn_submit mr10']); ?>
    </div>
</div>
<?php ActiveForm::end(); ?>