* Code for task #36028.

This commit is contained in:
holan20180123
2021-03-03 10:46:15 +08:00
parent 53def3b867
commit bc0c65f776
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -214,6 +214,9 @@ function toggleProgram(obj)
{
$programs.removeAttr('disabled');
}
var programID = $('#programs').val();
getPGMStatus('program', programID);
}
}
@@ -279,6 +282,7 @@ function toggleProject(obj)
$('form .prj-exist').removeClass('hidden');
$('form .prj-no-exist').addClass('hidden');
$PGMParams.addClass('hidden');
$('#PRJStatus').closest('tr').removeClass('hidden');
$projects.removeAttr('disabled');
if($('#newProgram0').prop('checked'))
@@ -593,3 +597,13 @@ function computeEndDate(delta)
$('#end').val(endDate).datetimepicker('update');
computeWorkDays();
}
function getPGMStatus(objectType, programID)
{
var link = createLink('upgrade', 'ajaxGetPGMStatus', 'programID=' + programID);
$.post(link, function(data)
{
if(objectType == 'program') $('#PGMStatus').val(data);
if(objectType == 'project') $('#PRJStatus').val(data);
})
}
+1 -1
View File
@@ -19,7 +19,7 @@
<?php echo html::hidden('programID', '');?>
</td>
</tr>
<tr class='PGMStatus'>
<tr>
<th><?php echo $lang->program->PGMCommon . $lang->program->PGMStatus;?></th>
<td><?php echo html::select('PGMStatus', $lang->program->statusList, '', "class='form-control chosen'");?></td>
</tr>