* Code for task #36042.
This commit is contained in:
@@ -83,8 +83,13 @@ $config->product->search['params']['lastEditedDate'] = array('operator' => '=',
|
||||
|
||||
$config->product->create = new stdclass();
|
||||
$config->product->edit = new stdclass();
|
||||
$config->product->create->requiredFields = 'name,program';
|
||||
$config->product->edit->requiredFields = 'name,program';
|
||||
$config->product->create->requiredFields = 'name';
|
||||
$config->product->edit->requiredFields = 'name';
|
||||
if($config->global->mode == 'new')
|
||||
{
|
||||
$config->product->create->requiredFields .= ',program';
|
||||
$config->product->edit->requiredFields .= ',program';
|
||||
}
|
||||
|
||||
$config->product->editor = new stdclass();
|
||||
$config->product->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
|
||||
@@ -333,6 +333,7 @@ class product extends control
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs('', 'noclosed');
|
||||
$this->view->lines = $this->config->global->mode == 'new' ? array() : array('' => '') + $this->product->getLinePairs();
|
||||
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
@@ -467,6 +468,10 @@ class product extends control
|
||||
$rdUsers = $this->user->getPairs('nodeleted|devfirst', $product->RD, $this->config->maxCount);
|
||||
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink;
|
||||
|
||||
$lines = array();
|
||||
if($product->program) $lines = array('') + $this->product->getLinePairs($product->program);
|
||||
if($this->config->global->mode == 'old') $lines = array('') + $this->product->getLinePairs();
|
||||
|
||||
$this->view->title = $this->lang->product->edit . $this->lang->colon . $product->name;
|
||||
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name);
|
||||
$this->view->position[] = $this->lang->product->edit;
|
||||
@@ -480,7 +485,7 @@ class product extends control
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs();
|
||||
$this->view->lines = $product->program ? array('') + $this->product->getLinePairs($product->program) : array();
|
||||
$this->view->lines = $lines;
|
||||
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
|
||||
$this->view->canChangePGM = $canChangePGM;
|
||||
$this->view->singleLinkProjects = $singleLinkProjects;
|
||||
|
||||
@@ -80,9 +80,18 @@
|
||||
<?php foreach($program as $lineID => $line):?>
|
||||
<?php if(isset($line['lineName'])):?>
|
||||
<?php
|
||||
$trAttrs = "data-id='line.$lineID' data-parent='program.$programID'";
|
||||
$trClass .= ' is-nest-child table-nest';
|
||||
$trAttrs .= " data-nest-parent='program.$programID' data-nest-path='program.$programID,$lineID'";
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$trAttrs = "data-id='line.$lineID' data-parent='program.$programID'";
|
||||
$trClass .= ' is-nest-child table-nest';
|
||||
$trAttrs .= " data-nest-parent='program.$programID' data-nest-path='program.$programID,$lineID'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$trAttrs = "data-id='line.$lineID' data-parent='0' data-nested='true'";
|
||||
$trClass = 'is-top-level table-nest-child';
|
||||
$trAttrs .= " class='$trClass'";
|
||||
}
|
||||
?>
|
||||
<tr <?php echo $trAttrs;?>>
|
||||
<td colspan="14">
|
||||
|
||||
@@ -21,13 +21,15 @@
|
||||
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->program->PGMCommon;?></th>
|
||||
<td><?php echo html::select('program', $programs, '', "class='form-control chosen' required");?></td><td></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->line;?></th>
|
||||
<td><?php echo html::select('line', '', '', "class='form-control chosen'");?></td><td></td>
|
||||
<td><?php echo html::select('line', $lines, '', "class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->name;?></th>
|
||||
|
||||
@@ -32,10 +32,12 @@
|
||||
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->program;?></th>
|
||||
<td><?php echo html::select('program', $programs, $product->program, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->line;?></th>
|
||||
<td><?php echo html::select('line', $lines, $product->line, "class='form-control chosen'");?></td><td></td>
|
||||
|
||||
Reference in New Issue
Block a user