From cb8e29414ed450d30ecef63650754161dad5d8f5 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Tue, 28 Mar 2023 16:17:48 +0800 Subject: [PATCH] * Code for task #89135. --- module/doc/control.php | 11 +++++++++-- module/doc/view/createlib.html.php | 5 ++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index c29eee4a80..27f0728dfb 100755 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -153,7 +153,11 @@ class doc extends control if($type == 'project') { $objects = $this->project->getPairsByProgram(); - if($this->app->tab == 'doc') $executions = $this->execution->getList($objectID); + if($this->app->tab == 'doc') + { + $executions = $this->execution->getList($objectID); + $this->view->project = $this->project->getById($objectID); + } } if($type == 'execution') { @@ -1449,6 +1453,9 @@ class doc extends control } } } - return print(html::select('execution', $executionPairs, 0, "class='form-control' data-placeholder='{$this->lang->doclib->tip->selectExecution}'")); + + $project = $this->project->getById($projectID); + $disabled = $project->multiple ? '' : 'disabled'; + return print(html::select('execution', $executionPairs, 0, "class='form-control' data-placeholder='{$this->lang->doclib->tip->selectExecution}' $disabled")); } } diff --git a/module/doc/view/createlib.html.php b/module/doc/view/createlib.html.php index cc1d4ef0c3..b28e31e7c9 100644 --- a/module/doc/view/createlib.html.php +++ b/module/doc/view/createlib.html.php @@ -30,7 +30,10 @@ tab == 'doc' and $type == 'project'):?> doc->execution?> - doclib->tip->selectExecution}'")?> + + multiple ? '' : 'disabled';?> + doclib->tip->selectExecution}' $disabled")?> +