Merge branch 'sprint/master_zhouxudong_58576' into 'master'
Sprint/master zhouxudong 58576 See merge request easycorp/zentaopms!4163
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
#budget {border-right: 0px;}
|
||||
#budgetUnit {border-left: 0px;}
|
||||
#dateRange {vertical-align: top; padding-top: 13px;}
|
||||
#endList {vertical-align: top; padding-top: 13px;}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
#budget {border-right: 0px;}
|
||||
#budgetUnit {border-left: 0px;}
|
||||
#dateRange {vertical-align: top; padding-top: 13px;}
|
||||
#endList {vertical-align: top; padding-top: 13px;}
|
||||
|
||||
@@ -99,10 +99,10 @@ $lang->program->noProgram = 'No program.';
|
||||
$lang->program->showClosed = 'Closed programs.';
|
||||
$lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.';
|
||||
$lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?";
|
||||
$lang->program->beginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
|
||||
$lang->program->endGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
|
||||
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
|
||||
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
|
||||
$lang->program->beginLetterParent = 'The start date of the program "%s" should be ≥ the start date of the parent program "%s": %s.';
|
||||
$lang->program->endGreaterParent = 'The finish date of the program "%s" should be ≤ the finish date of the parent program "%s": %s.';
|
||||
$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the subprogram "%s": %s.';
|
||||
$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the subprogram "%s": %s.';
|
||||
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
|
||||
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
|
||||
$lang->program->hasProduct = 'It has products. You cannot delete it.';
|
||||
|
||||
@@ -99,10 +99,10 @@ $lang->program->noProgram = 'No program.';
|
||||
$lang->program->showClosed = 'Closed';
|
||||
$lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.';
|
||||
$lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?";
|
||||
$lang->program->beginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
|
||||
$lang->program->endGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
|
||||
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
|
||||
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
|
||||
$lang->program->beginLetterParent = 'The start date of the program "%s" should be ≥ the start date of the parent program "%s": %s.';
|
||||
$lang->program->endGreaterParent = 'The finish date of the program "%s" should be ≤ the finish date of the parent program "%s": %s.';
|
||||
$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the subprogram "%s": %s.';
|
||||
$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the subprogram "%s": %s.';
|
||||
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
|
||||
$lang->program->hasChildren = 'The program has a child program or the project exists and can not be deleted.';
|
||||
$lang->program->hasProduct = 'The program has products exist and can not be deleted.';
|
||||
|
||||
@@ -99,10 +99,10 @@ $lang->program->noProgram = 'No program.';
|
||||
$lang->program->showClosed = 'Closed programs.';
|
||||
$lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.';
|
||||
$lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?";
|
||||
$lang->program->beginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
|
||||
$lang->program->endGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
|
||||
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
|
||||
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
|
||||
$lang->program->beginLetterParent = 'La date de début du programme "%s" doit être ≥ à la date de début du programme parent "%s" : %s.';
|
||||
$lang->program->endGreaterParent = 'La date de fin du programme "%s" doit être ≤ à la date de fin du programme parent "%s" : %s.';
|
||||
$lang->program->beginGreateChild = 'La date de début du programme parent "%s" doit être ≤ à la date de début minimum du sous-programme "%s" : %s.';
|
||||
$lang->program->endLetterChild = 'Le temps de fin du programme parent "%s" doit être ≥ au temps de fin maximum du sous-programme "%s" : %s.';
|
||||
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
|
||||
$lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.';
|
||||
$lang->program->hasProduct = 'It has products. You cannot delete it.';
|
||||
|
||||
@@ -99,10 +99,10 @@ $lang->program->noProgram = '暂时没有项目集';
|
||||
$lang->program->showClosed = '显示已关闭';
|
||||
$lang->program->tips = '选择了父项目集,则可关联该父项目集下的产品。如果项目未选择任何项目集,则系统会默认创建一个和该项目同名的产品并关联该项目。';
|
||||
$lang->program->confirmBatchUnlink = "您确定要批量移除这些干系人吗?";
|
||||
$lang->program->beginLetterParent = "父项目集的开始日期:%s,开始日期不能小于父项目集的开始日期";
|
||||
$lang->program->endGreaterParent = "父项目集的完成日期:%s,完成日期不能大于父项目集的完成日期";
|
||||
$lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期";
|
||||
$lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期";
|
||||
$lang->program->beginLetterParent = '项目集“%s”开始日期应大于等于父项目集“%s”的开始日期:%s。';
|
||||
$lang->program->endGreaterParent = '项目集“%s”完成日期应小于等于父项目集“%s”的完成日期:%s。';
|
||||
$lang->program->beginGreateChild = '父项目集“%s”的开始日期应小于等于子项目集“%s”的最小开始时间:%s。';
|
||||
$lang->program->endLetterChild = '父项目集“%s”的完成时间应大于等于子项目集“%s”的最大完成时间:%s。';
|
||||
$lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态';
|
||||
$lang->program->hasChildren = '该项目集有子项目集或项目存在,不能删除。';
|
||||
$lang->program->hasProduct = '该项目集有产品存在,不能删除。';
|
||||
|
||||
+10
-10
@@ -709,13 +709,13 @@ class programModel extends model
|
||||
if($parentProgram)
|
||||
{
|
||||
/* Child program begin cannot less than parent. */
|
||||
if($program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $parentProgram->begin);
|
||||
if(!empty($program->name) and $program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $program->name, $parentProgram->name, $parentProgram->begin);
|
||||
|
||||
/* When parent set end then child program end cannot greater than parent. */
|
||||
if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
|
||||
if(!empty($program->name) and$parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
|
||||
|
||||
/* When parent set end then child program cannot set longTime. */
|
||||
if(empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
|
||||
if(!empty($program->name) and empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
|
||||
|
||||
/* The budget of a child program cannot beyond the remaining budget of the parent program. */
|
||||
$program->budgetUnit = $parentProgram->budgetUnit;
|
||||
@@ -799,11 +799,11 @@ class programModel extends model
|
||||
|
||||
if($children > 0)
|
||||
{
|
||||
$minChildBegin = $this->dao->select('min(begin) as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->fetch('minBegin');
|
||||
$maxChildEnd = $this->dao->select('max(end) as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->fetch('maxEnd');
|
||||
$minChildBegin = $this->dao->select('name, min(begin) as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->fetch();
|
||||
$maxChildEnd = $this->dao->select('name, max(end) as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->fetch();
|
||||
|
||||
if($minChildBegin and $program->begin > $minChildBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $minChildBegin);
|
||||
if($maxChildEnd and $program->end < $maxChildEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $maxChildEnd);
|
||||
if($minChildBegin and $program->begin > $minChildBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $program->name, $minChildBegin->name, $minChildBegin->minBegin);
|
||||
if($maxChildEnd and $program->end < $maxChildEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $program->name, $maxChildEnd->name, $maxChildEnd->maxEnd);
|
||||
if(dao::isError()) return false;
|
||||
}
|
||||
|
||||
@@ -818,9 +818,9 @@ class programModel extends model
|
||||
$parentProgram = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($program->parent)->fetch();
|
||||
if($parentProgram)
|
||||
{
|
||||
if($program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $parentProgram->begin);
|
||||
if($parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
|
||||
if(empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end);
|
||||
if(!empty($program->name) and $program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $program->name, $parentProgram->name, $parentProgram->begin);
|
||||
if(!empty($program->name) and $parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
|
||||
if(!empty($program->name) and empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end);
|
||||
}
|
||||
|
||||
/* The budget of a child program cannot beyond the remaining budget of the parent program. */
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->dateRange;?></th>
|
||||
<th id="dateRange"><?php echo $lang->project->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', date('Y-m-d'), "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->begin . "' required");?>
|
||||
@@ -96,7 +96,7 @@
|
||||
<?php echo html::input('end', '', "class='form-control form-date' placeholder='" . $lang->project->end . "' required");?>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->program->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->program->endList, '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->project->status;?></th>
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->dateRange;?></th>
|
||||
<th id="dateRange"><?php echo $lang->project->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $program->begin, "class='form-control form-date' placeholder='" . $lang->project->begin . "' required");?>
|
||||
@@ -81,7 +81,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<?php $endValue = $program->end == LONG_TIME ? 999 : (strtotime($program->end) - strtotime($program->begin)) / 3600 / 24 + 1;?>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->program->endList , $endValue, "onclick='computeEndDate(this.value)'");?></td>
|
||||
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->program->endList , $endValue, "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->realBegan;?></th>
|
||||
|
||||
@@ -696,6 +696,7 @@ class project extends control
|
||||
if($this->post->names)
|
||||
{
|
||||
$allChanges = $this->project->batchUpdate();
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
if(!empty($allChanges))
|
||||
{
|
||||
@@ -707,7 +708,8 @@ class project extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
return print(js::locate($this->session->projectList, 'parent'));
|
||||
$locateLink = $this->session->projectList;
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
|
||||
}
|
||||
|
||||
if(!$this->post->projectIdList) return print(js::locate($this->session->projectList, 'parent'));
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
.popover-sm .popover-content {padding: 8px 10px; max-width: 228px;}
|
||||
.c-future {width: 56px;}
|
||||
|
||||
#dateRange {vertical-align: top; padding-top: 13px;}
|
||||
#endList {vertical-align: top; padding-top: 13px;}
|
||||
#copyProjectModal {padding: 0;}
|
||||
#copyProjectModal {padding: 0 2px;}
|
||||
#copyProjectModal > div {position: relative;}
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
#budgetUnit {border-left: 0px;}
|
||||
#plansBox .row {display: inline-table; width: 102%;}
|
||||
#plansBox .col-sm-4 {float: none; display: inline-block;}
|
||||
#dateRange {vertical-align: top; padding-top: 13px;}
|
||||
#endList {vertical-align: top; padding-top: 13px;}
|
||||
|
||||
@@ -317,8 +317,8 @@ $lang->project->parentBeginEnd = "Parent begin&end date: %s ~ %s";
|
||||
$lang->project->parentBudget = "The budget of the parent project: ";
|
||||
$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project.";
|
||||
$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project.";
|
||||
$lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set.";
|
||||
$lang->project->endLetterChild = "The maximum finish date for the project set: %s. The completion date of a project cannot be greater than the maximum completion date of the project set.";
|
||||
$lang->project->beginGreateChild = 'The start date of project "%s" should be greater than or equal to the minimum start date of project "%s" set : %s';
|
||||
$lang->project->endLetterChild = 'The finish date for project "%s" should be less than or equal to the maximum finish date for project "%s" set :%s';
|
||||
$lang->project->childLongTime = "If a child as long-term projects, the parent should be long-term too.";
|
||||
$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
|
||||
|
||||
|
||||
@@ -317,8 +317,8 @@ $lang->project->parentBeginEnd = "The begin and end date of the parent proj
|
||||
$lang->project->parentBudget = "The budget of the parent project: ";
|
||||
$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project.";
|
||||
$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project.";
|
||||
$lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set.";
|
||||
$lang->project->endLetterChild = "The maximum finish date for the project set: %s. The completion date of a project cannot be greater than the maximum completion date of the project set.";
|
||||
$lang->project->beginGreateChild = 'The start date of project "%s" should be greater than or equal to the minimum start date of project "%s" set : %s';
|
||||
$lang->project->endLetterChild = 'The finish date for project "%s" should be less than or equal to the maximum finish date for project "%s" set :%s';
|
||||
$lang->project->childLongTime = "There are long-term projects in the child project, and the parent project should also be a long-term project.";
|
||||
$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
|
||||
|
||||
|
||||
@@ -317,8 +317,8 @@ $lang->project->parentBeginEnd = "Parent begin&end date: %s ~ %s";
|
||||
$lang->project->parentBudget = "The budget of the parent project: ";
|
||||
$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project.";
|
||||
$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project.";
|
||||
$lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set.";
|
||||
$lang->project->endLetterChild = "The maximum finish date for the project set: %s. The completion date of a project cannot be greater than the maximum completion date of the project set.";
|
||||
$lang->project->beginGreateChild = 'La date de début du projet "%s" doit être supérieure ou égale à la date de début minimale du projet "%s" set : % s';
|
||||
$lang->project->endLetterChild = 'La date d\'achèvement du projet "%s" doit être inférieure ou égale à la date d\'achèvement maximale de l\'ensemble du projet "%s" set: % s';
|
||||
$lang->project->childLongTime = "If a child as long-term projects, the parent should be long-term too.";
|
||||
$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
|
||||
|
||||
|
||||
@@ -317,8 +317,8 @@ $lang->project->parentBeginEnd = "父项目起止时间:%s ~ %s";
|
||||
$lang->project->parentBudget = "父项目预算:";
|
||||
$lang->project->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期";
|
||||
$lang->project->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期";
|
||||
$lang->project->beginGreateChild = "项目集的最小开始日期:%s,项目的开始日期不能小于项目集的最小开始日期";
|
||||
$lang->project->endLetterChild = "项目集的最大完成日期:%s,项目的完成日期不能大于项目集的最大完成日期";
|
||||
$lang->project->beginGreateChild = '项目“%s”的开始日期应大于等于项目集“%s”的最小开始日期:%s';
|
||||
$lang->project->endLetterChild = '项目“%s”的完成日期应小于等于项目集“%s”的最大完成日期:%s';
|
||||
$lang->project->childLongTime = "子项目中有长期项目,父项目也应该是长期项目";
|
||||
$lang->project->confirmUnlinkMember = "您确定从该项目中移除该用户吗?";
|
||||
|
||||
|
||||
@@ -1085,10 +1085,10 @@ class projectModel extends model
|
||||
if($program)
|
||||
{
|
||||
/* Child project begin cannot less than parent. */
|
||||
if($project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $program->begin);
|
||||
if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $project->name, $program->name, $program->begin);
|
||||
|
||||
/* When parent set end then child project end cannot greater than parent. */
|
||||
if($program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end);
|
||||
if(!empty($project->name) and $$program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $project->name, $program->name, $program->end);
|
||||
|
||||
if(dao::isError()) return false;
|
||||
}
|
||||
@@ -1349,10 +1349,10 @@ class projectModel extends model
|
||||
if($program)
|
||||
{
|
||||
/* Child project begin cannot less than parent. */
|
||||
if($project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $program->begin);
|
||||
if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $project->name, $program->name, $program->begin);
|
||||
|
||||
/* When parent set end then child project end cannot greater than parent. */
|
||||
if($program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end);
|
||||
if(!empty($project->name) and $program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $project->name, $program->name, $program->end);
|
||||
|
||||
if(dao::isError()) return false;
|
||||
}
|
||||
@@ -1518,11 +1518,18 @@ class projectModel extends model
|
||||
if($parentProject)
|
||||
{
|
||||
/* Child project begin cannot less than parent. */
|
||||
if($projects[$projectID]->begin < $parentProject->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $parentProject->begin);
|
||||
if(!empty($projects[$projectID]->name) and $projects[$projectID]->begin < $parentProject->begin)
|
||||
{
|
||||
dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $projects[$projectID]->name, $parentProject->name, $parentProject->begin);
|
||||
return false;
|
||||
}
|
||||
|
||||
/* When parent set end then child project end cannot greater than parent. */
|
||||
if($parentProject->end != '0000-00-00' and $projects[$projectID]->end > $parentProject->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $parentProject->end);
|
||||
|
||||
if(!empty($projects[$projectID]->name) and $parentProject->end != '0000-00-00' and $projects[$projectID]->end > $parentProject->end)
|
||||
{
|
||||
dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $projects[$projectID]->name, $parentProject->name, $parentProject->end);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1534,7 +1541,7 @@ class projectModel extends model
|
||||
$projects[$projectID]->{$extendField->field} = htmlSpecialString($projects[$projectID]->{$extendField->field});
|
||||
}
|
||||
}
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
if(dao::isError()) return false;
|
||||
|
||||
foreach($projects as $projectID => $project)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->project->batchEdit;?></h2>
|
||||
</div>
|
||||
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchEditForm">
|
||||
<form method='post' class='load-indicator main-form form-ajax' enctype='multipart/form-data' id="batchEditForm">
|
||||
<table class="table table-form">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->dateRange;?></th>
|
||||
<th id="dateRange"><?php echo $lang->project->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', date('Y-m-d'), "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->begin . "' required");?>
|
||||
@@ -92,7 +92,7 @@
|
||||
<?php echo html::input('end', '', "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->end . "' required");?>
|
||||
</div>
|
||||
</td>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<tr id='daysBox'>
|
||||
<th><?php echo $lang->execution->days;?></th>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->dateRange;?></th>
|
||||
<th id="dateRange"><?php echo $lang->project->dateRange;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', $project->begin, "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->begin . "' required");?>
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<?php $deltaValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;?>
|
||||
<td colspan='2'><?php echo html::radio('delta', $lang->project->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
|
||||
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->project->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
|
||||
</tr>
|
||||
<tr id='daysBox' <?php if($project->end == LONG_TIME) echo "class='hidden'";?>>
|
||||
<th><?php echo $lang->project->days;?></th>
|
||||
|
||||
Reference in New Issue
Block a user