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

$attrLabels = $model->attributeLabels();
/* @var $this yii\web\View */
?>

<div class="modal-window" >
     <?= \home\widgets\Alert::widget(); ?>
<?php $form = ActiveForm::begin([
                'id' => 'main-form',
				'options' => ['class' => 'informationform f14'],
                'action' => $action,
				'fieldConfig' => [
					'options' => ['tag' => 'td'],
					'template' => "{input}{hint}{error}",
					'errorOptions' => ["class" => "error" ]
				]
            ]); ?>


    <table cellpadding="0" cellspacing="10" width="100%">
        <tbody>
            <tr class="field-user-username required">
                <td align="right" width="80"><?= $model->getAttributeLabel('username') ?>：</td>
                <?= $form->field($model, 'username')->textInput(['class' => 'form-control','readonly' =>'true']) ?>
                <td><span class="redstar"></span></td>
            </tr>

            <tr>
                <td align="right" width="80"><?= $model->getAttributeLabel('realname') ?>：</td>
                <?= $form->field($model, 'realname')->textInput(['class' => 'form-control']) ?>
                <td><span class="redstar">*</span></td>
            </tr>

            <tr>
                <td align="right" width="80"><?= $model->getAttributeLabel('email') ?>：</td>
                <?= $form->field($model, 'email')->textInput(['class' => 'form-control']) ?>
                <td><span class="redstar">*</span></td>
            </tr>

             <tr>
                <td align="right"><?= $model->getAttributeLabel('gender') ?>：</td>
                <?= $form->field($model, 'gender')->radioList(User::getGenderList(), ['itemOptions' => ['labelOptions' => ['class'=>'radio-inline'] ] ]) ?>
                <td></td> 
            </tr>

            <tr>
                <td align="right" width="80"><?= $model->getAttributeLabel('avatar') ?>：</td>
                <td><?= Uploader::widget(['model' => $model, 'form' => $form, 'attribute' => 'avatar', 'type' => 'image']) ?></td>
                <td><span class="redstar"></span></td>
            </tr>
            
            <tr>
                <td align="right" width="80"><?= $model->getAttributeLabel('phone') ?>：</td>
                <?= $form->field($model->info, 'phone')->textInput(['class' => 'form-control']) ?>
                <td><span class="redstar"></span></td>
            </tr>
            <tr>
                <td align="right" width="80"><?= $model->getAttributeLabel('qq') ?>：</td>
                <?= $form->field($model->info, 'qq')->textInput(['class' => 'form-control']) ?>
                <td><span class="redstar"></span></td>
            </tr>
            <tr>
                <td align="right" width="80"><?= $model->getAttributeLabel('remark') ?>：</td>
                <?= $form->field($model->info, 'remark')->textarea(['class' => 'form-control']) ?>
                <td><span class="redstar"></span></td>
            </tr>
    
        </tbody>
    </table>
<?php ActiveForm::end(); ?>
</div>
