* code for task #73993.

This commit is contained in:
wangyidong
2022-11-01 08:45:15 +08:00
parent b04efbf36c
commit 3a8ef27bec
3 changed files with 18 additions and 3 deletions
+11
View File
@@ -113,6 +113,17 @@ $(function()
$('#days').addClass('has-info')
$('#days').parent().after('<div id="daysLabelInfo" class="text-info">' + daysTips + '</div>')
}
$("[name='multiple']").change(function()
{
$('#endList #delta999').closest('.radio-inline').toggle($(this).val() != 0);
if($('#endList #delta999').prop('checked') && $(this).val() == 0)
{
$('#endList #delta999').prop('checked', false);
$('#dateBox #end').val('');
$('#daysBox').removeClass('hidden');
}
})
});
/**
+1 -1
View File
@@ -127,7 +127,7 @@
<?php echo html::input('end', '', "class='form-control form-date' onchange='computeWorkDays();' placeholder='" . $lang->project->end . "' required");?>
</div>
</td>
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->project->endList , '', "onclick='computeEndDate(this.value)'");?></td>
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->project->endList, '', "onclick='computeEndDate(this.value)'");?></td>
</tr>
<tr id='daysBox'>
<th><?php echo $lang->execution->days;?></th>
+6 -2
View File
@@ -130,8 +130,12 @@
?>
</div>
</td>
<?php $deltaValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;?>
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->project->endList , $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
<?php
/* Remove LONG_TIME item when no multiple project. */
if(empty($project->multiple)) unset($lang->project->endList[999]);
$deltaValue = $project->end == LONG_TIME ? 999 : (strtotime($project->end) - strtotime($project->begin)) / 3600 / 24 + 1;
?>
<td id="endList" colspan='2'><?php echo html::radio('delta', $lang->project->endList, $deltaValue, "onclick='computeEndDate(this.value)'");?></td>
</tr>
<tr id='daysBox' <?php if($project->end == LONG_TIME) echo "class='hidden'";?>>
<th><?php echo $lang->project->days;?></th>