Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
e8a5a5c1
Commit
e8a5a5c1
authored
Oct 21, 2016
by
杨培
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复发布课程界面添加讲师时的错误。
parent
ec0db105
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
Teacher.php
src/common/models/Teacher.php
+2
-0
ClassesInfoController.php
src/frontend/controllers/ClassesInfoController.php
+1
-1
No files found.
src/common/models/Teacher.php
View file @
e8a5a5c1
...
...
@@ -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'
=>
''
],
];
}
...
...
src/frontend/controllers/ClassesInfoController.php
View file @
e8a5a5c1
...
...
@@ -90,7 +90,7 @@ class ClassesInfoController extends \yii\web\Controller
if
(
!
$agreement
)
{
$model
->
addError
(
'agreement'
,
'必须同意使用协议'
);
}
elseif
(
$model
->
validate
()
&&
$model
->
save
())
{
return
$this
->
re
direct
(
'/classes-info'
);
return
$this
->
re
nder
(
'@app/views/site/success'
,
[
'message'
=>
'您已成功提交课堂申请,我们将尽快为您审核通过。'
]
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment