Commit e8a5a5c1 authored by 杨培's avatar 杨培

修复发布课程界面添加讲师时的错误。

parent ec0db105
......@@ -45,8 +45,10 @@ class Teacher extends ActiveRecord
[['name', 'class_id'], 'required'],
[['user_id', 'created_at', 'updated_at'], 'integer'],
[['intro'], 'string'],
[['intro'], 'default', 'value'=>''],
[['name'], 'string', 'min'=>2, 'max' => 64],
[['avatar'], 'string', 'max' => 100],
[['avatar'], 'default', 'value' => ''],
];
}
......
......@@ -90,7 +90,7 @@ class ClassesInfoController extends \yii\web\Controller
if (!$agreement) {
$model->addError('agreement', '必须同意使用协议');
} elseif ($model->validate() && $model->save()) {
return $this->redirect('/classes-info');
return $this->render('@app/views/site/success', ['message'=>'您已成功提交课堂申请,我们将尽快为您审核通过。']);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment