* Finish task #9000.
This commit is contained in:
@@ -8,16 +8,22 @@ $(function()
|
||||
var impact = $('#impact').val();
|
||||
var probability = $('#probability').val();
|
||||
var rate = parseInt(impact * probability);
|
||||
var pri = '';
|
||||
var pri = '';
|
||||
var priColor = '';
|
||||
if(0 < rate && rate <= 5) pri = 'low';
|
||||
if(5 < rate && rate <= 12) pri = 'middle';
|
||||
if(15 <= rate && rate <= 25) pri = 'high';
|
||||
|
||||
if(pri == 'low') priColor = 'text-black';
|
||||
if(pri == 'middle') priColor = 'text-yellow';
|
||||
if(pri == 'high') priColor = 'text-red';
|
||||
|
||||
$('#rate').val(rate);
|
||||
$('#pri').val(pri);
|
||||
$('#pri').trigger("chosen:updated")
|
||||
$('#pri').chosen();
|
||||
$('#pri').attr('disabled', true);
|
||||
$('#priValue .chosen-container-single .chosen-single>span').attr("class", priColor);
|
||||
$('input[name="pri"]').remove();
|
||||
$('#pri').after("<input type='hidden' name='pri' value='" + pri + "'/>");
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->risk->pri;?></th>
|
||||
<td><?php echo html::select('pri', $lang->risk->priList, '', "class='form-control chosen'");?></td>
|
||||
<td id='priValue'><?php echo html::select('pri', $lang->risk->priList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->risk->plannedClosedDate;?></th>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->risk->pri;?></th>
|
||||
<td><?php echo html::select('pri', $lang->risk->priList, $risk->pri, "class='form-control chosen'");?></td>
|
||||
<td id='priValue'><?php echo html::select('pri', $lang->risk->priList, $risk->pri, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->risk->identifiedDate;?></th>
|
||||
|
||||
Reference in New Issue
Block a user