diff --git a/module/todo/control.php b/module/todo/control.php index 15c66a3848..4f95695b4f 100644 --- a/module/todo/control.php +++ b/module/todo/control.php @@ -118,6 +118,17 @@ class todo extends control public function mark($todoID, $status) { $this->todo->mark($todoID, $status); + $todo = $this->todo->getById($todoID); + if($todo->status == 'done') + { + if($todo->type == 'bug' or $todo->type == 'task') + { + $confirmNote = 'confirm' . ucfirst($todo->type); + $confirmURL = $this->createLink($todo->type, 'view', "id=$todo->idvalue"); + $cancelURL = $this->server->HTTP_REFERER; + die(js::confirm(sprintf($this->lang->todo->$confirmNote, $todo->idvalue), $confirmURL, $cancelURL, 'parent', 'parent')); + } + } die(js::reload('parent')); } diff --git a/module/todo/lang/zh-cn.php b/module/todo/lang/zh-cn.php index 7085247f33..f4e9abaffd 100644 --- a/module/todo/lang/zh-cn.php +++ b/module/todo/lang/zh-cn.php @@ -51,6 +51,8 @@ $lang->todo->week = '星期'; $lang->todo->today = '今天'; $lang->todo->weekDateList = '一,二,三,四,五,六,天'; $lang->todo->dayInFeature = '暂不指定'; +$lang->todo->confirmBug = '该Todo关联的是Bug #%s,需要修改它吗?'; +$lang->todo->confirmTask = '该Todo关联的是Task #%s,需要修改它吗?'; $lang->todo->statusList['wait'] = '未开始'; $lang->todo->statusList['doing'] = '进行中';