* Code for task #89135.

This commit is contained in:
tianshujie
2023-03-28 16:17:48 +08:00
parent a85291e639
commit cb8e29414e
2 changed files with 13 additions and 3 deletions
+9 -2
View File
@@ -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"));
}
}
+4 -1
View File
@@ -30,7 +30,10 @@
<?php if($app->tab == 'doc' and $type == 'project'):?>
<tr class='executionBox'>
<th><?php echo $lang->doc->execution?></th>
<td><?php echo html::select('execution', $executionPairs, 0, "class='form-control chosen' data-drop_direction='down' data-placeholder='{$lang->doclib->tip->selectExecution}'")?></td>
<td>
<?php $disabled = $project->multiple ? '' : 'disabled';?>
<?php echo html::select('execution', $executionPairs, 0, "class='form-control chosen' data-drop_direction='down' data-placeholder='{$lang->doclib->tip->selectExecution}' $disabled")?>
</td>
</tr>
<?php endif;?>
<tr>