* Finish task#8734.
This commit is contained in:
@@ -125,7 +125,6 @@ class programModel extends model
|
||||
->setIF($this->post->budget != 0, 'budget', number_format($this->post->budget, 2))
|
||||
->add('type', 'program')
|
||||
->join('whitelist', ',')
|
||||
->cleanFloat('budget')
|
||||
->stripTags($this->config->program->editor->pgmcreate['id'], $this->config->allowedTags)
|
||||
->remove('delta,future')
|
||||
->get();
|
||||
@@ -1215,7 +1214,6 @@ class programModel extends model
|
||||
->setDefault('team', substr($this->post->name, 0, 30))
|
||||
->add('type', 'project')
|
||||
->join('whitelist', ',')
|
||||
->cleanFloat('budget')
|
||||
->stripTags($this->config->program->editor->prjcreate['id'], $this->config->allowedTags)
|
||||
->remove('products,branch,plans,delta,newProduct,productName,future')
|
||||
->get();
|
||||
@@ -1384,9 +1382,11 @@ class programModel extends model
|
||||
->setIF($this->post->begin == '0000-00-00', 'begin', '')
|
||||
->setIF($this->post->end == '0000-00-00', 'end', '')
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->setIF($this->post->future, 'budget', 0)
|
||||
->setIF($this->post->budget != 0, 'budget', number_format($this->post->budget, 2))
|
||||
->join('whitelist', ',')
|
||||
->stripTags($this->config->program->editor->prjedit['id'], $this->config->allowedTags)
|
||||
->remove('products,branch,plans,delta')
|
||||
->remove('products,branch,plans,delta,future')
|
||||
->get();
|
||||
|
||||
if($project->parent)
|
||||
|
||||
@@ -38,55 +38,12 @@
|
||||
<th><?php echo $lang->program->PRJName;?></th>
|
||||
<td class="col-main"><?php echo html::input('name', $project->name, "class='form-control' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJCode;?></th>
|
||||
<td><?php echo html::input('code', $project->code, "class='form-control' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<?php if($project->model == 'waterfall'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJCategory;?></th>
|
||||
<td><?php echo html::select('product', $lang->program->PRJCategoryList, $project->product, "class='form-control'");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->manageProducts;?></th>
|
||||
<td class='text-left' id='productsBox' colspan="3">
|
||||
<div class='row'>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($linkedProducts as $product):?>
|
||||
<div class='col-sm-4'>
|
||||
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
|
||||
<div class="input-group<?php if($hasBranch) echo ' has-branch';?>">
|
||||
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' data-placeholder={$lang->program->errorNoProducts} onchange='loadBranches(this)' data-last='" . $product->id . "'");?>
|
||||
<span class='input-group-addon fix-border'></span>
|
||||
<?php if($hasBranch) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div class='col-sm-4 <?php if($programID) echo 'required';?>'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
|
||||
<span class='input-group-addon fix-border'></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->linkPlan;?></th>
|
||||
<td id="plansBox" colspan="3">
|
||||
<div class='row'>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($linkedProducts as $product):?>
|
||||
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
|
||||
<div class="col-sm-4" id="plan<?php echo $i;?>"><?php echo html::select("plans[" . $product->id . "]", $plans, $product->plan, "class='form-control chosen'");?></div>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-sm-4" id="planDefault"><?php echo html::select("plans[0]", array(), 0, "class='form-control chosen'");?></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJPM;?></th>
|
||||
<td><?php echo html::select('PM', $PMUsers, $project->PM, "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
|
||||
@@ -95,12 +52,17 @@
|
||||
<th><?php echo $lang->program->PRJBudget;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('budget', $project->budget ? $project->budget : '', "class='form-control'" . (strpos($requiredFields, 'budget') !== false ? ' required' : ''));?>
|
||||
<?php echo html::input('budget', $project->budget != 0 ? $project->budget : '', "class='form-control'" . (strpos($requiredFields, 'budget') !== false ? ' required' : '') . ($project->budget == 0 ? 'disabled' : ''));?>
|
||||
<span class='input-group-addon'></span>
|
||||
<?php echo html::select('budgetUnit', $lang->program->unitList, $project->budgetUnit, "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='muted'></td>
|
||||
<td>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' id='future' name='future' value='1' <?php if($project->budget == 0) echo 'checked';?> />
|
||||
<label for='future'><?php echo $lang->program->future;?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->dateRange;?></th>
|
||||
@@ -131,6 +93,45 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->manageProducts;?></th>
|
||||
<td class='text-left' id='productsBox' colspan="3">
|
||||
<div class='row'>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($linkedProducts as $product):?>
|
||||
<div class='col-sm-4'>
|
||||
<?php $hasBranch = $product->type != 'normal' and isset($branchGroups[$product->id]);?>
|
||||
<div class="input-group<?php if($hasBranch) echo ' has-branch';?>">
|
||||
<?php echo html::select("products[$i]", $allProducts, $product->id, "class='form-control chosen' data-placeholder={$lang->program->errorNoProducts} onchange='loadBranches(this)' data-last='" . $product->id . "'");?>
|
||||
<span class='input-group-addon fix-border'></span>
|
||||
<?php if($hasBranch) echo html::select("branch[$i]", $branchGroups[$product->id], $product->branch, "class='form-control chosen' onchange=\"loadPlans('#products{$i}', this.value)\"");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div class='col-sm-4 <?php if($programID) echo 'required';?>'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
|
||||
<span class='input-group-addon fix-border'></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->linkPlan;?></th>
|
||||
<td id="plansBox" colspan="3">
|
||||
<div class='row'>
|
||||
<?php $i = 0;?>
|
||||
<?php foreach($linkedProducts as $product):?>
|
||||
<?php $plans = zget($productPlans, $product->id, array(0 => ''));?>
|
||||
<div class="col-sm-4" id="plan<?php echo $i;?>"><?php echo html::select("plans[" . $product->id . "]", $plans, $product->plan, "class='form-control chosen'");?></div>
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-sm-4" id="planDefault"><?php echo html::select("plans[0]", array(), 0, "class='form-control chosen'");?></div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJStoryConcept;?></th>
|
||||
<td>
|
||||
@@ -140,14 +141,9 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJDesc;?></th>
|
||||
<td colspan='3'>
|
||||
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=project&link=desc');?>
|
||||
<?php echo html::textarea('desc', $project->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->auth;?></th>
|
||||
<td colspan='3'><?php echo html::radio('auth', $lang->program->PRJAuthList, $project->auth, '', 'block');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td colspan='3' class='aclBox'><?php echo nl2br(html::radio('acl', $aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
@@ -158,6 +154,10 @@
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->auth;?></th>
|
||||
<td colspan='3'><?php echo html::radio('auth', $lang->program->PRJAuthList, $project->auth, '', 'block');?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user