From 947cbf4cfcceb8fe6a36f9670acfdf2b2bd02491 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 3 May 2023 16:59:52 +0800 Subject: [PATCH] * submit control layers ajaxGetExecutions function. --- module/project/control.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index 314920b0c3..9873457aa9 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1982,23 +1982,25 @@ class project extends control } /** + * 获取项目页面中下拉执行列表 * AJAX: get executions of a project in html select. * - * @param int $projectID + * @param string $projectID * @param int $executionID * @param string $mode - * @param string $type all|sprint|stage|kanban + * @param string $type all|sprint|stage|kanban + * * @access public * @return void */ - public function ajaxGetExecutions($projectID, $executionID = 0, $mode = '', $type = 'all') + public function ajaxGetExecutions(string $projectID, int $executionID = 0, string $mode = '', string $type = 'all'): void { - $project = $this->project->getById($projectID); + $project = $this->project->getByID($projectID); + $disabled = $project->multiple ? '' : 'disabled'; $executions = array('' => '') + $this->loadModel('execution')->getPairs($projectID, $type, $mode); - if($this->app->getViewType() == 'json') return print(json_encode($executionList)); + if($this->app->getViewType() == 'json') return print(json_encode($executions)); - $disabled = $project->multiple ? '' : 'disabled'; return print(html::select('execution', $executions, $executionID, "class='form-control $disabled' $disabled")); }