|
|
|
@ -28,7 +28,8 @@ class BoardsNew extends Component{
|
|
|
|
|
this.state = {
|
|
|
|
|
fileList: [],
|
|
|
|
|
boards: [],
|
|
|
|
|
title_num: 0
|
|
|
|
|
title_num: 0,
|
|
|
|
|
email_notify:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
addSuccess = () => {
|
|
|
|
@ -44,6 +45,7 @@ class BoardsNew extends Component{
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
boards: response.data.data.boards || [],
|
|
|
|
|
boardsdata:response.data.data,
|
|
|
|
|
course_id: response.data.data.course_id
|
|
|
|
|
})
|
|
|
|
|
if (!isEdit) {
|
|
|
|
@ -158,6 +160,7 @@ class BoardsNew extends Component{
|
|
|
|
|
|
|
|
|
|
axios.post(url, {
|
|
|
|
|
...values,
|
|
|
|
|
email_notify:this.state.email_notify,
|
|
|
|
|
course_id: cid,
|
|
|
|
|
attachment_ids,
|
|
|
|
|
})
|
|
|
|
@ -247,6 +250,12 @@ class BoardsNew extends Component{
|
|
|
|
|
const boardId = this.props.match.params.boardId
|
|
|
|
|
this.props.toListPage(courseId, boardId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setemailchange=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
email_notify:e.target.checked
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let { addGroup, fileList, course_id, title_num } = this.state;
|
|
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
|
@ -289,6 +298,7 @@ class BoardsNew extends Component{
|
|
|
|
|
const boardId = this.props.match.params.boardId
|
|
|
|
|
const isCourseEnd = this.props.isCourseEnd();
|
|
|
|
|
document.title=this.props.coursedata&&this.props.coursedata.name;
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain ">
|
|
|
|
|
<AddDirModal {...this.props}
|
|
|
|
@ -401,6 +411,10 @@ class BoardsNew extends Component{
|
|
|
|
|
</Select>
|
|
|
|
|
)}
|
|
|
|
|
</Form.Item>
|
|
|
|
|
{this.state.boardsdata&&this.state.boardsdata.email_notify===true?this.props.isAdminOrTeacher()===true?this.isEdit ?"":<span className={"setemail"}>
|
|
|
|
|
<Checkbox onChange={this.setemailchange} checked={this.state.email_notify}>发送邮件提醒</Checkbox>
|
|
|
|
|
</span>:"":""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/* { isAdmin && <Form.Item
|
|
|
|
|
label=""
|
|
|
|
|