* Hide product when create Repo in project module.

This commit is contained in:
wangjianhua
2022-11-23 10:22:37 +08:00
parent bedc9e9309
commit 36051c118c
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -94,7 +94,7 @@
<?php if(common::hasPriv('repo', 'downloadCode')): ?>
<button type="button" class="btn btn-primary" data-toggle="popover" id="downloadCode" title="<?php echo $lang->repo->downloadCode;?>"><i class='icon icon-sm icon-download'></i> <?php echo $lang->repo->download;?> <i class='icon icon-sm icon-caret-down'></i></button>
<?php endif;?>
<?php if(common::hasPriv('repo', 'create') and $currentProject and !$currentProject->hasProduct) echo html::a(helper::createLink('repo', 'create', "objectID=$objectID"), "<i class='icon icon-plus'></i> " . $this->lang->repo->createAction, '', "class='btn btn-primary'");?>
<?php if(common::hasPriv('repo', 'create') and $currentProject) echo html::a(helper::createLink('repo', 'create', "objectID=$objectID"), "<i class='icon icon-plus'></i> " . $this->lang->repo->createAction, '', "class='btn btn-primary'");?>
</div>
</div>
<div id="mainContent" class="main-row fade">
+4
View File
@@ -23,10 +23,14 @@
</div>
<form id='repoForm' method='post' class='form-ajax'>
<table class='table table-form'>
<?php if($this->app->tab =='project'):?>
<?php echo html::hidden('product', implode(',', array_keys($products)));?>
<?php else:?>
<tr>
<th><?php echo $lang->repo->product;?></th>
<td class='required'><?php echo html::select('product[]', $products, empty($objectID) ? '' : array_keys($products), "class='form-control chosen' multiple");?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->repo->projects;?></th>
<td id='projectContainer'><?php echo html::select('projects[]', $projects, $relatedProjects, "class='form-control chosen' multiple");?></td>