* Add the ajax request when change parent stage for task #83955.

This commit is contained in:
hufangzhou
2023-02-07 01:08:03 +00:00
parent 3e1b5be66e
commit 9137ed1b83
3 changed files with 44 additions and 13 deletions
+9 -6
View File
@@ -25,7 +25,7 @@
<tbody>
<tr>
<th class="w-100px"><?php echo $lang->programplan->parent;?></th>
<td colspan='2'><?php echo html::select('parent', $parentStage, $plan->parent, "class='form-control chosen '");?></td>
<td colspan='2'><?php echo html::select('parent', $parentStageList, $plan->parent, "class='form-control chosen '");?></td>
</tr>
<tr>
<th class='w-100px'><?php echo $lang->programplan->name;?> </th>
@@ -46,9 +46,11 @@
</div>
</td>
</tr>
<tr class="<?php if($plan->grade == 2) echo "hidden";?>" id="attributeType">
<th><?php echo $lang->programplan->attribute;?> </th>
<td colspan='2'><?php echo html::select('attribute', $lang->stage->typeList, $plan->attribute, "class='form-control'");?></td>
<tr id="attributeType">
<th><?php echo $lang->programplan->attribute;?></th>
<td colspan='2'>
<?php echo $enableOptionalAttr ? html::select('attribute', $lang->stage->typeList, $plan->attribute, "class='form-control'") : zget($lang->stage->typeList, $plan->attribute);?>
</td>
</tr>
<?php if($plan->setMilestone):?>
<tr>
@@ -101,16 +103,17 @@
$("#parent").change(function()
{
var parent = $(this).children("option:selected").val();
if(parent == 0)
{
$("#attributeType").removeClass('hidden');
$("#acl").attr('disabled', false);
}
else
{
$("#attributeType").addClass('hidden');
$("#acl").attr('disabled', true);
}
changeParentStage(parent);
});
</script>
<?php include '../../common/view/footer.html.php';?>