修复#2号bug-激活状态无法编辑任务,需要先暂停任务

This commit is contained in:
郝大全
2017-12-01 10:59:35 +08:00
parent 08a4cd00f8
commit 05e5e45752
3 changed files with 16 additions and 3 deletions

View File

@@ -149,6 +149,10 @@ func (this *TaskController) Edit() {
this.showMsg(err.Error())
}
if task.Status != 0 {
this.ajaxMsg("激活状态无法编辑任务,请先暂停任务", MSG_ERR)
}
if this.isPost() {
task.TaskName = strings.TrimSpace(this.GetString("task_name"))
task.Description = strings.TrimSpace(this.GetString("description"))