+ code for task#754

This commit is contained in:
chencongzhi520@gmail.com
2012-04-22 07:10:16 +00:00
parent 6bbb9f2346
commit 1e0b3905dd
2 changed files with 11 additions and 5 deletions
+7 -5
View File
@@ -215,11 +215,13 @@ class taskModel extends model
{
$now = helper::now();
$oldTask = $this->getById($taskID);
$this->dao->update(TABLE_TASK)
->set('assignedTo')->eq($this->post->assignedTo)
->set('lastEditedBy')->eq($this->app->user->account)
->set('lastEditedDate')->eq($now)
->where('id')->eq($taskID)->exec();
$task = fixer::input('post')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->remove('comment')
->get();
$this->dao->update(TABLE_TASK)->data($task) ->where('id')->eq($taskID)->exec();
$actionID = $this->loadModel('action')->create('task', $taskID, 'Assigned', $this->post->comment, $this->post->assignedTo);
$this->dao->insert(TABLE_HISTORY)
+4
View File
@@ -18,6 +18,10 @@
<th class='rowhead'><?php echo $lang->task->assignedTo;?></th>
<td><?php echo html::select('assignedTo', $users, '', "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->left;?></th>
<td><?php echo html::input('left', $task->left, "class='text-3'");?></td>
</tr>
<tr>
<td class='rowhead'><?php echo $lang->comment;?></td>
<td><?php echo html::textarea('comment', '', "rows='6' class='area-1'");?></td>