* code for task #65286.
This commit is contained in:
@@ -1652,7 +1652,7 @@ class taskModel extends model
|
||||
{
|
||||
$currentTeam = $this->getTeamByAccount($oldTask->team);
|
||||
if($currentTeam and $this->post->consumed < $currentTeam->consumed) dao::$errors['consumed'] = $this->lang->task->error->consumedSmall;
|
||||
if($currentTeam and $currentTeam->status == 'doing') dao::$errors[] = $this->lang->task->error->alreadyStarted;
|
||||
if($currentTeam and $currentTeam->status == 'doing' and $oldTask->status == 'doing') dao::$errors[] = $this->lang->task->error->alreadyStarted;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1695,7 +1695,7 @@ class taskModel extends model
|
||||
$estimate->left = zget($_POST, 'left', 0);
|
||||
$estimate->work = zget($task, 'work', '');
|
||||
$estimate->account = $this->app->user->account;
|
||||
$estimate->consumed = !empty($oldTask->team) ? $estimate->consumed - $oldTask->team[$this->app->user->account]->consumed : $estimate->consumed - $oldTask->consumed;
|
||||
$estimate->consumed = (!empty($oldTask->team) and $currentTeam) ? $estimate->consumed - $currentTeam->consumed : $estimate->consumed - $oldTask->consumed;
|
||||
if($this->post->comment) $estimate->work = $this->post->comment;
|
||||
$this->addTaskEstimate($estimate);
|
||||
|
||||
|
||||
@@ -283,10 +283,17 @@ foreach(explode(',', $config->task->edit->requiredFields) as $field)
|
||||
<?php
|
||||
$memberDisabled = false;
|
||||
$sortDisabled = false;
|
||||
if($member->status == 'done') $memberDisabled = true;
|
||||
if($member->status != 'wait' and $task->mode == 'linear') $sortDisabled = true;
|
||||
$memberStatus = $member->status;
|
||||
if($memberStatus == 'done') $memberDisabled = true;
|
||||
if($memberStatus != 'wait' and $task->mode == 'linear') $sortDisabled = true;
|
||||
if($task->mode == 'linear' and strpos('|closed|cancel|pause|', $task->status) !== false)
|
||||
{
|
||||
$memberStatus = $task->status;
|
||||
$memberDisabled = true;
|
||||
$sortDisabled = true;
|
||||
}
|
||||
?>
|
||||
<tr class='member-<?php echo $member->status;?>' data-estimate='<?php echo (float)$member->estimate?>' data-consumed='<?php echo (float)$member->consumed?>' data-left='<?php echo (float)$member->left?>'>
|
||||
<tr class='member-<?php echo $memberStatus;?>' data-estimate='<?php echo (float)$member->estimate?>' data-consumed='<?php echo (float)$member->consumed?>' data-left='<?php echo (float)$member->left?>'>
|
||||
<td class='w-250px'>
|
||||
<?php echo html::select("team[]", $members, $member->account, "class='form-control chosen'" . ($memberDisabled ? ' disabled' : ''))?>
|
||||
<?php echo html::hidden("source[]", $member->account);?>
|
||||
|
||||
Reference in New Issue
Block a user