Merge branch 'sprint/169_zhouxin_43617' into 'sprint/169'

Finish task #43617.

See merge request easycorp/zentaopms!229
This commit is contained in:
孙广明
2021-10-29 07:17:58 +00:00
10 changed files with 58 additions and 31 deletions
+1 -1
View File
@@ -313,7 +313,7 @@ class productplan extends control
$this->view->canBeChanged = $canBeChanged;
if($this->app->getViewType() == 'json')
{
{
unset($this->view->storyPager);
unset($this->view->bugPager);
}
+2 -3
View File
@@ -41,7 +41,6 @@ function computeEndDate(delta)
$('#begin').on('change', function()
{
$("#end").val('');
$("input:radio[name='delta']").attr("checked",false);
});
@@ -55,11 +54,11 @@ $('#future').on('change', function()
if($(this).prop('checked'))
{
$('#begin').attr('disabled', 'disabled');
$('#end').val('').parents('tr').hide();
$('#end').attr('disabled', 'disabled').parents('tr').hide();
}
else
{
$('#begin').removeAttr('disabled');
$('#end').val('').parents('tr').show();
$('#end').removeAttr('disabled').parents('tr').show();
}
});
+6 -4
View File
@@ -77,10 +77,12 @@ $lang->productplan->endList[93] = '3 Monate';
$lang->productplan->endList[186] = '6 Monate';
$lang->productplan->endList[365] = '1 Jahr';
$lang->productplan->errorNoTitle = 'ID %s Titel darf nicht leer sein.';
$lang->productplan->errorNoBegin = 'ID %s Start darf nicht leer sein.';
$lang->productplan->errorNoEnd = 'ID %s Ende darf nicht leer sein.';
$lang->productplan->beginGeEnd = 'ID %s Start darf nicht größer als Ende sein.';
$lang->productplan->errorNoTitle = 'ID %s Titel darf nicht leer sein.';
$lang->productplan->errorNoBegin = 'ID %s Start darf nicht leer sein.';
$lang->productplan->errorNoEnd = 'ID %s Ende darf nicht leer sein.';
$lang->productplan->beginGeEnd = 'ID %s Start darf nicht größer als Ende sein.';
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'Alle';
$lang->productplan->featureBar['browse']['unexpired'] = 'Nicht abgelaufen';
+6 -4
View File
@@ -78,10 +78,12 @@ $lang->productplan->endList[93] = '3 Months';
$lang->productplan->endList[186] = '6 Months';
$lang->productplan->endList[365] = '1 Year';
$lang->productplan->errorNoTitle = 'ID %s title should not be empty.';
$lang->productplan->errorNoBegin = 'ID %s begin time should not be empty.';
$lang->productplan->errorNoEnd = 'ID %s end time should not be empty.';
$lang->productplan->beginGeEnd = 'ID %s begin time should not be >= end time.';
$lang->productplan->errorNoTitle = 'ID %s title should not be empty.';
$lang->productplan->errorNoBegin = 'ID %s begin time should not be empty.';
$lang->productplan->errorNoEnd = 'ID %s end time should not be empty.';
$lang->productplan->beginGeEnd = 'ID %s begin time should not be >= end time.';
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'All';
$lang->productplan->featureBar['browse']['unexpired'] = 'Unexpired';
+6 -4
View File
@@ -77,10 +77,12 @@ $lang->productplan->endList[93] = '3 Mois';
$lang->productplan->endList[186] = '6 Mois';
$lang->productplan->endList[365] = '1 Année';
$lang->productplan->errorNoTitle = 'ID %s titre ne doit pas être à blanc.';
$lang->productplan->errorNoBegin = "ID %s l'heure de début devrait être renseignée.";
$lang->productplan->errorNoEnd = "ID %s l'heure de fin devrait être renseignée.";
$lang->productplan->beginGeEnd = "ID %s l'heure de début ne doit pas être >= à l'heure de fin.";
$lang->productplan->errorNoTitle = 'ID %s titre ne doit pas être à blanc.';
$lang->productplan->errorNoBegin = "ID %s l'heure de début devrait être renseignée.";
$lang->productplan->errorNoEnd = "ID %s l'heure de fin devrait être renseignée.";
$lang->productplan->beginGeEnd = "ID %s l'heure de début ne doit pas être >= à l'heure de fin.";
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'Tous';
$lang->productplan->featureBar['browse']['unexpired'] = 'Non échus';
+6 -4
View File
@@ -77,10 +77,12 @@ $lang->productplan->endList[93] = '3 tháng';
$lang->productplan->endList[186] = '6 tháng';
$lang->productplan->endList[365] = '1 năm';
$lang->productplan->errorNoTitle = 'Tiêu đề ID %s không nên trống.';
$lang->productplan->errorNoBegin = 'Thời gian bắt đầu ID %s không nên trống.';
$lang->productplan->errorNoEnd = 'Thời gian kết thúc ID %s không nên trống.';
$lang->productplan->beginGeEnd = 'ID %s thời gian bắt đầu không nên >= thời gian kết thúc.';
$lang->productplan->errorNoTitle = 'Tiêu đề ID %s không nên trống.';
$lang->productplan->errorNoBegin = 'Thời gian bắt đầu ID %s không nên trống.';
$lang->productplan->errorNoEnd = 'Thời gian kết thúc ID %s không nên trống.';
$lang->productplan->beginGeEnd = 'ID %s thời gian bắt đầu không nên >= thời gian kết thúc.';
$lang->productplan->beginLetterParent = "Parent begin date: %s, begin date should be >= parent begin date.";
$lang->productplan->endGreaterParent = "Parent end date: %s, end date should be <= parent end date.";
$lang->productplan->featureBar['browse']['all'] = 'Tất cả';
$lang->productplan->featureBar['browse']['unexpired'] = 'Chưa quá hạn';
+7 -4
View File
@@ -78,10 +78,13 @@ $lang->productplan->endList[93] = '三个月';
$lang->productplan->endList[186] = '半年';
$lang->productplan->endList[365] = '一年';
$lang->productplan->errorNoTitle = 'ID %s 标题不能为空';
$lang->productplan->errorNoBegin = 'ID %s 开始时间不能为空';
$lang->productplan->errorNoEnd = 'ID %s 结束时间不能为空';
$lang->productplan->beginGeEnd = 'ID %s 开始时间不能大于结束时间';
$lang->productplan->errorNoTitle = 'ID %s 标题不能为空';
$lang->productplan->errorNoBegin = 'ID %s 开始时间不能为空';
$lang->productplan->errorNoEnd = 'ID %s 结束时间不能为空';
$lang->productplan->beginGeEnd = 'ID %s 开始时间不能大于结束时间';
$lang->productplan->beginLetterParent = "父计划的开始日期:%s,开始日期不能小于父计划的开始日期";
$lang->productplan->endGreaterParent = "父计划的完成日期:%s,完成日期不能大于父计划的完成日期";
$lang->productplan->featureBar['browse']['all'] = '全部';
$lang->productplan->featureBar['browse']['unexpired'] = '未过期';
+6 -4
View File
@@ -78,10 +78,12 @@ $lang->productplan->endList[93] = '三個月';
$lang->productplan->endList[186] = '半年';
$lang->productplan->endList[365] = '一年';
$lang->productplan->errorNoTitle = 'ID %s 標題不能為空';
$lang->productplan->errorNoBegin = 'ID %s 開始時間不能為空';
$lang->productplan->errorNoEnd = 'ID %s 結束時間不能為空';
$lang->productplan->beginGeEnd = 'ID %s 開始時間不能大於結束時間';
$lang->productplan->errorNoTitle = 'ID %s 標題不能為空';
$lang->productplan->errorNoBegin = 'ID %s 開始時間不能為空';
$lang->productplan->errorNoEnd = 'ID %s 結束時間不能為空';
$lang->productplan->beginGeEnd = 'ID %s 開始時間不能大於結束時間';
$lang->productplan->beginLetterParent = "父計畫的開始日期:%s,開始日期不能小於父計畫的開始日期";
$lang->productplan->endGreaterParent = "父計畫的完成日期:%s,完成日期不能大於父計畫的完成日期";
$lang->productplan->featureBar['browse']['all'] = '全部';
$lang->productplan->featureBar['browse']['unexpired'] = '未過期';
+12
View File
@@ -332,6 +332,18 @@ class productplanModel extends model
->setIF($this->post->future || empty($_POST['end']), 'end', '2030-01-01')
->remove('delta,uid,future')
->get();
if(!empty($plan->parentBegin))
{
if($plan->begin < $plan->parentBegin) dao::$errors['begin'] = sprintf($this->lang->productplan->beginLetterParent, $plan->parentBegin);
}
if(!empty($plan->parentEnd))
{
if($plan->end !=='2030-01-01' and $plan->end > $plan->parentEnd) dao::$errors['end'] = sprintf($this->lang->productplan->endGreaterParent, $plan->parentEnd);
}
unset($plan->parentBegin);
unset($plan->parentEnd);
if(!$this->post->future and strpos($this->config->productplan->create->requiredFields, 'begin') !== false and empty($_POST['begin']))
{
dao::$errors['begin'] = sprintf($this->lang->error->notempty, $this->lang->productplan->begin);
+6 -3
View File
@@ -20,12 +20,15 @@
<h2> <?php echo $parent ? $lang->productplan->createChildren : $lang->productplan->create;?></h2>
</div>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<table class='table table-form'>
<tbody>
<?php if($parent):?>
<tr>
<th><?php echo $lang->productplan->parent;?></th>
<td class='muted'><?php echo $parentPlan->title;?></td><td></td><td></td>
<td class='muted'><?php echo $parentPlan->title;?>
<?php echo html::hidden('parentBegin', $parentPlan->begin);?>
<?php echo html::hidden('parentEnd', $parentPlan->end);?>
</td><td></td><td></td>
</tr>
<?php else:?>
<tr>
@@ -48,7 +51,7 @@
<th><?php echo $lang->productplan->begin;?></th>
<td><?php echo html::input('begin', formatTime($begin), "class='form-control form-date'");?></td>
<td>
<div class='checkbox-primary'>
<div class='checkbox-primary'>
<input type='checkbox' id='future' name='future' value='1' />
<label for='future'><?php echo $lang->productplan->future;?></label>
</div>