This commit is contained in:
mayue
2022-05-19 07:45:02 +00:00
parent 66c6bf6bc5
commit 8e415b38cb
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -497,7 +497,6 @@ class productplanModel extends model
$plan = fixer::input('post')->stripTags($this->config->productplan->editor->edit['id'], $this->config->allowedTags)
->setIF($this->post->future or empty($_POST['begin']), 'begin', $this->config->productplan->future)
->setIF($this->post->future or empty($_POST['end']), 'end', $this->config->productplan->future)
->setIF(!isset($_POST['parent']), 'parent', -1)
->add('id', $planID)
->remove('delta,uid,future')
->get();
@@ -516,7 +515,7 @@ class productplanModel extends model
if($plan->end !== $this->config->productplan->future and $plan->end > $parentPlan->end) dao::$errors['end'] = sprintf($this->lang->productplan->endGreaterParent, $parentPlan->end);
}
}
elseif($plan->parent == -1 and $plan->begin != $this->config->productplan->future)
elseif($oldPlan->parent == -1 and $plan->begin != $this->config->productplan->future)
{
$childPlans = $this->getChildren($oldPlan->id);
$minBegin = $plan->begin;
+1 -1
View File
@@ -39,7 +39,7 @@
<th><?php echo $lang->productplan->title;?></th>
<td><?php echo html::input('title', $plan->title, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr <?php echo $plan->parent == '-1' ? class='hidden': '';?>>
<tr <?php echo $plan->parent == '-1' ? "class='hidden'": '';?>>
<th><?php echo $lang->productplan->parent;?></th>
<td><?php echo html::select('parent', array('0' => '') + $parentPlanPairs, $plan->parent, "class='form-control chosen'");?>
</tr>