/** * 列表 * @return {[type]} [description] * @version 1.0 2015-12-31T17:27:14+0800 * @author cnzhangxl@foxmail.com */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => JobLevel::find()]); return $this->render('index', ['dataProvider' => $dataProvider]); }
echo $form->field($model, 'username')->textInput(['maxlength' => true, 'placeholder' => '输入' . $model->getAttributeLabel("username")]); ?> <?php echo $form->field($model, 'password_hash')->passwordInput(['maxlength' => true, 'value' => '', 'placeholder' => '输入' . $model->getAttributeLabel("password_hash")]); ?> <?php echo $form->field($model, 'email')->textInput(['maxlength' => true, 'placeholder' => '输入' . $model->getAttributeLabel("email")]); ?> <?php echo $form->field($model, 'nickname')->textInput(['maxlength' => true, 'placeholder' => '输入' . $model->getAttributeLabel("nickname")]); ?> <?php echo $form->field($model, 'avatar')->fileInput(); ?> <?php echo $form->field($model, 'job_level')->textInput(['maxlength' => true])->dropDownList(ArrayHelper::map(JobLevel::find()->all(), 'id', 'name')); ?> <?php echo $form->field($model, 'tel')->textInput(['maxlength' => true, 'placeholder' => '输入' . $model->getAttributeLabel("tel")]); ?> <?php echo $form->field($model, 'mobile')->textInput(['maxlength' => true, 'placeholder' => '输入' . $model->getAttributeLabel("mobile")]); ?> <?php echo $form->field($model, 'status')->textInput()->dropDownList([$model::STATUS_ACTIVE => '激活', $model::STATUS_DELETED => '删除']); ?> </div><!-- /.box-body --> <div class="box-footer"> <?php echo Html::submitButton($model->isNewRecord ? '创建' : '更新', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);