* when copy project, copy the name and code also.

This commit is contained in:
wangchunsheng
2012-02-22 08:13:08 +00:00
parent 2812e857ba
commit 3498c26ed4
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -730,6 +730,8 @@ class project extends control
exit;
}
$name = '';
$code = '';
$team = '';
$products = '';
$whitelist = '';
@@ -738,6 +740,8 @@ class project extends control
if($copyProjectID)
{
$copyProject = $this->dao->select('*')->from(TABLE_PROJECT)->where('id')->eq($copyProjectID)->fetch();
$name = $copyProject->name;
$code = $copyProject->code;
$team = $copyProject->team;
$acl = $copyProject->acl;
$whitelist = $copyProject->whitelist;
@@ -760,6 +764,8 @@ class project extends control
$this->view->projects = array('' => '') + $this->projects;
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->allProducts = $this->loadModel('product')->getPairs();
$this->view->name = $name;
$this->view->code = $code;
$this->view->team = $team;
$this->view->products = $products ;
$this->view->whitelist = $whitelist;
+2 -2
View File
@@ -36,11 +36,11 @@ $(document).ready(function()
<caption><?php echo $lang->project->create;?></caption>
<tr>
<th class='rowhead'><?php echo $lang->project->name;?></th>
<td><?php echo html::input('name', '', "class='text-3'");?></td>
<td><?php echo html::input('name', $name, "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->code;?></th>
<td><?php echo html::input('code', '', "class='text-3'");?></td>
<td><?php echo html::input('code', $code, "class='text-3'");?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->project->begin;?></th>