This commit is contained in:
wangyidong
2020-12-08 09:21:32 +08:00
parent badeb97dca
commit 8de5f93c2b
32 changed files with 290 additions and 253 deletions
+6 -3
View File
@@ -1247,15 +1247,18 @@ class task extends control
/**
* AJAX: return tasks of a user in html select.
*
* @param string $account
* @param int $userID
* @param string $id
* @param string $status
* @access public
* @return string
*/
public function ajaxGetUserTasks($account = '', $id = '', $status = 'wait,doing')
public function ajaxGetUserTasks($userID = '', $id = '', $status = 'wait,doing')
{
if($account == '') $account = $this->app->user->account;
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$tasks = $this->task->getUserTaskPairs($account, $status);
if($id) die(html::select("tasks[$id]", $tasks, '', 'class="form-control"'));