* fix bug #27092.
This commit is contained in:
+5
-19
@@ -1212,35 +1212,21 @@ class task extends control
|
||||
*/
|
||||
public function deleteEstimate($estimateID, $confirm = 'no')
|
||||
{
|
||||
$estimate = $this->task->getEstimateById($estimateID);
|
||||
$task = $this->task->getById($estimate->task);
|
||||
if($confirm == 'no' and $task->consumed - $estimate->consumed != 0)
|
||||
if($confirm == 'no')
|
||||
{
|
||||
return print(js::confirm($this->lang->task->confirmDeleteEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes")));
|
||||
}
|
||||
elseif($confirm == 'no' and $task->consumed - $estimate->consumed == 0)
|
||||
{
|
||||
return print(js::confirm($this->lang->task->confirmDeleteLastEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$estimate = $this->task->getEstimateById($estimateID);
|
||||
$task = $this->task->getById($estimate->task);
|
||||
$changes = $this->task->deleteEstimate($estimateID);
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'DeleteEstimate');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
if($task->consumed - $estimate->consumed == 0)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('task', $estimate->task, 'Adjusttasktowait');
|
||||
}
|
||||
if($task->consumed - $estimate->consumed == 0)
|
||||
{
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
|
||||
return print(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.';
|
||||
|
||||
$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?";
|
||||
$lang->task->confirmDeleteEstimate = "Do you want to delete it?";
|
||||
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
|
||||
$lang->task->copyStoryTitle = "Story kopieren";
|
||||
$lang->task->afterSubmit = "Nach der Erstellung,";
|
||||
$lang->task->successSaved = "Erstellt!";
|
||||
|
||||
@@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.';
|
||||
|
||||
$lang->task->confirmDelete = "Do you want to delete this task?";
|
||||
$lang->task->confirmDeleteEstimate = "Do you want to delete it?";
|
||||
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
|
||||
$lang->task->copyStoryTitle = "Copy Story";
|
||||
$lang->task->afterSubmit = "Next ";
|
||||
$lang->task->successSaved = "Created!";
|
||||
|
||||
@@ -218,7 +218,6 @@ $lang->task->legendMisc = 'Misc.';
|
||||
|
||||
$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?";
|
||||
$lang->task->confirmDeleteEstimate = "Voulez-vous la supprimer ?";
|
||||
$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started.";
|
||||
$lang->task->copyStoryTitle = '<span style="color:blue;">StoryModel</span>';
|
||||
$lang->task->afterSubmit = "Suiv. ";
|
||||
$lang->task->successSaved = "Créée !";
|
||||
|
||||
@@ -218,7 +218,6 @@ $lang->task->legendMisc = '其他相关';
|
||||
|
||||
$lang->task->confirmDelete = "您确定要删除这个任务吗?";
|
||||
$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?";
|
||||
$lang->task->confirmDeleteLastEstimate = "您确定要删除该条日志吗?删除最后一条工时日志后,该任务状态将调整为未开始。";
|
||||
$lang->task->copyStoryTitle = "同{$lang->SRCommon}";
|
||||
$lang->task->afterSubmit = "添加之后";
|
||||
$lang->task->successSaved = "成功添加,";
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
.table-recorded thead{background: rgb(245 245 245);}
|
||||
</style>
|
||||
<?php $members = $task->members;?>
|
||||
<?php js::set('confirmRecord', (!empty($members) && $task->mode == 'linear' && && $task->assignedTo != end($members)) ? $lang->task->confirmTransfer : $lang->task->confirmRecord);?>
|
||||
<?php js::set('confirmRecord', (!empty($members) && $task->mode == 'linear' && $task->assignedTo != end($members)) ? $lang->task->confirmTransfer : $lang->task->confirmRecord);?>
|
||||
<?php js::set('noticeSaveRecord', $lang->task->noticeSaveRecord);?>
|
||||
<?php js::set('today', helper::today());?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
|
||||
Reference in New Issue
Block a user