Merge branch dev/bug-63562 of zentao/zentaopms (#9830)
This commit is contained in:
@@ -66,7 +66,15 @@ $fields->field('type')
|
||||
->items($isStage ? $lang->stage->typeList : $lang->execution->lifeTimeList);
|
||||
|
||||
$plan = data('plan');
|
||||
if(!empty($project->isTpl))
|
||||
{
|
||||
if(empty($plan)) $plan = new stdclass();
|
||||
$plan->begin = $project->begin;
|
||||
$plan->end = $project->end;
|
||||
}
|
||||
|
||||
$fields->field('dateRange')
|
||||
->hidden(!empty($project->isTpl))
|
||||
->required()
|
||||
->control('inputGroup')
|
||||
->itemBegin('dateRangePicker')
|
||||
@@ -81,6 +89,7 @@ $fields->field('dateRange')
|
||||
->itemEnd();
|
||||
|
||||
$fields->field('days')
|
||||
->hidden(!empty($project->isTpl))
|
||||
->width('1/4')
|
||||
->required(strpos($requiredFields, ",days,") !== false)
|
||||
->label($lang->execution->days . sprintf($lang->execution->unitTemplate, $lang->execution->day))
|
||||
|
||||
@@ -131,6 +131,20 @@ $fnGenerateFields = function() use ($lang, $requiredFields, $showFields, $fields
|
||||
$field['value'] = empty($programPlan) ? 'open' : $programPlan->acl;
|
||||
}
|
||||
|
||||
if(!empty($project->isTpl))
|
||||
{
|
||||
if($name == 'begin')
|
||||
{
|
||||
$field['value'] = $project->begin;
|
||||
$field['hidden'] = true;
|
||||
}
|
||||
if($name == 'end')
|
||||
{
|
||||
$field['value'] = $project->end;
|
||||
$field['hidden'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Field for agileplus. */
|
||||
if($name == 'type' && in_array($project->model, array('waterfallplus', 'ipd')))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user