* Finish task #70759.

This commit is contained in:
tanghucheng
2022-09-27 11:10:47 +08:00
parent 8aba8d639a
commit 2fbae5ed72
3 changed files with 13 additions and 7 deletions
+9 -6
View File
@@ -519,12 +519,13 @@ class project extends control
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
parse_str($extra, $output);
$name = '';
$code = '';
$team = '';
$whitelist = '';
$acl = 'private';
$auth = 'extend';
$name = '';
$code = '';
$team = '';
$whitelist = '';
$acl = 'private';
$auth = 'extend';
$hasProduct = 1;
$products = array();
$productPlans = array();
@@ -541,6 +542,7 @@ class project extends control
$whitelist = $copyProject->whitelist;
$programID = $copyProject->parent;
$model = $copyProject->model;
$hasProduct = $copyProject->hasProduct;
$products = $this->product->getProducts($copyProjectID);
foreach($products as $product)
@@ -585,6 +587,7 @@ class project extends control
$this->view->acl = $acl;
$this->view->auth = $auth;
$this->view->whitelist = $whitelist;
$this->view->hasProduct = $hasProduct;
$this->view->copyProjectID = $copyProjectID;
$this->view->programList = $this->program->getParentPairs();
$this->view->parentProgram = $parentProgram;
+2
View File
@@ -7,6 +7,8 @@ $(function()
$('#productTitle, #linkPlan').closest('tr').toggle(hasProduct == 1);
});
$('[name=hasProduct]').change();
$('#copyProjects a').click(function()
{
setCopyProject($(this).data('id'));
+2 -1
View File
@@ -74,7 +74,7 @@
<?php endif;?>
<tr>
<th id='projectType'><?php echo $lang->project->type;?></th>
<td><?php echo html::radio('hasProduct', $lang->project->projectTypeList, 1);?></td>
<td><?php echo html::radio('hasProduct', $lang->project->projectTypeList, $hasProduct, $copyProjectID ? 'disabled' : '');?></td>
</tr>
<tr>
<th><?php echo $lang->project->PM;?></th>
@@ -212,6 +212,7 @@
<tr>
<td colspan='4' class='text-center form-actions'>
<?php
if($copyProjectID) echo html::hidden('hasProduct', $hasProduct);
echo html::hidden('model', $model);
echo html::submitButton();
echo $gobackLink ? html::a($gobackLink, $lang->goback, '', 'class="btn btn-wide"') : html::backButton();