* Adjust project creation and editing logic.

This commit is contained in:
leiyong
2020-09-23 11:03:30 +08:00
parent 87ec019d60
commit 3dc97e7148
8 changed files with 135 additions and 51 deletions
+8 -8
View File
@@ -16,6 +16,7 @@
<?php js::set('template', $template);?>
<?php js::set('programID', $programID);?>
<?php js::set('from', $from);?>
<?php js::set('weekend', $config->project->weekend);?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
@@ -43,6 +44,12 @@
<th><?php echo $lang->program->PRJCode;?></th>
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
</tr>
<?php if($template == 'scrum'):?>
<tr>
<th><?php echo $lang->program->PRJCategory;?></th>
<td><?php echo html::select('lifetime', $lang->program->PRJLifeTimeList, '', "class='form-control'");?></td><td></td><td></td>
</tr>
<?php endif;?>
<?php if($template == 'waterfall'):?>
<tr>
<th><?php echo $lang->program->PRJCategory;?></th>
@@ -96,13 +103,6 @@
<th><?php echo $lang->project->teamname;?></th>
<td><?php echo html::input('team', $team, "class='form-control'");?></td><td></td><td></td>
</tr>
<tr class='hide'>
<th><?php echo $lang->project->status;?></th>
<td><?php echo html::hidden('status', 'wait');?></td>
<td></td>
<td></td>
<td></td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<th><?php echo $lang->program->PRJDesc;?></th>
@@ -113,7 +113,7 @@
</tr>
<tr>
<th><?php echo $lang->program->auth;?></th>
<td colspan='3'><?php echo html::radio('privway', $lang->program->PRJAuthList, $privway, '', 'block');?></td>
<td colspan='3'><?php echo html::radio('auth', $lang->program->PRJAuthList, $privway, '', 'block');?></td>
</tr>
<tr>
<th><?php echo $lang->project->acl;?></th>
+16 -7
View File
@@ -38,6 +38,12 @@
<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 == 'scrum'):?>
<tr>
<th><?php echo $lang->program->PRJCategory;?></th>
<td><?php echo html::select('lifetime', $lang->program->PRJLifeTimeList, $project->lifetime, "class='form-control'");?></td><td></td><td></td>
</tr>
<?php endif;?>
<?php if($project->model == 'waterfall'):?>
<tr>
<th><?php echo $lang->program->PRJCategory;?></th>
@@ -65,15 +71,16 @@
<div class='input-group'>
<?php echo html::input('begin', $project->begin, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->program->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->program->to;?></span>
<?php echo html::input('end', $project->end, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->program->end . "' required");?>
<?php if(empty($parentProgram) or $parentProgram->end == '0000-00-00'):?>
<span class='input-group-addon hidden' id='longTimeBox'>
<?php
$disabledEnd = empty($project->end) ? 'disabled' : '';
echo html::input('end', $project->end, "class='form-control form-date' onchange='computeWorkDays();' $disabledEnd placeholder='" . $lang->program->end . "' required");
?>
<span class='input-group-addon' id='longTimeBox'>
<div class="checkbox-primary">
<input type="checkbox" name="longTime" value="1" id="longTime">
<label for="longTime"><?php echo $lang->program->longTime;?></label>
<input type="checkbox" name="longTime" value="1" <?php echo empty($project->end) ? 'checked' : '';?> id="longTime">
<label for="longTime"><?php echo $lang->program->PRJLongTime;?></label>
</div>
</span>
<?php endif;?>
</div>
</td>
<td class='muted'></td>
@@ -86,7 +93,9 @@
<?php echo html::input('days', '', "class='form-control'");?>
<span class='input-group-addon'><?php echo $lang->project->day;?></span>
</div>
</td><td></td><td></td>
</td>
<td></td>
<td></td>
</tr>
<?php endif;?>
<tr>