* Finish task #62852.

This commit is contained in:
zhouxudong
2022-08-02 08:39:29 +00:00
parent 03d68d05ff
commit 69dd615244
5 changed files with 9 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
#budget {border-right: 0px;} #budget {border-right: 0px;}
#budgetUnit {border-left: 0px;} #budgetUnit {border-left: 0px;}
#dateRange, .undetermined {vertical-align: top !important; padding-top: 13px !important;} #dateRange, .futureBox {vertical-align: top !important; padding-top: 13px !important;}
#endList {vertical-align: top; padding-top: 13px;} #endList {vertical-align: top; padding-top: 13px;}
[lang^=en] #endList {vertical-align: top; padding-top: 20px;} [lang^=en] #endList {vertical-align: top; padding-top: 20px;}
#dataform th {vertical-align: top; padding-top: 13px;} #dataform th {vertical-align: top; padding-top: 13px;}

View File

@@ -1,5 +1,5 @@
#budget {border-right: 0px;} #budget {border-right: 0px;}
#budgetUnit {border-left: 0px;} #budgetUnit {border-left: 0px;}
#dateRange, .undetermined {vertical-align: top !important; padding-top: 13px !important;} #dateRange, .futureBox {vertical-align: top !important; padding-top: 13px !important;}
#endList {vertical-align: top; padding-top: 13px;} #endList {vertical-align: top; padding-top: 13px;}
#dataform th {vertical-align: top; padding-top: 13px;} #dataform th {vertical-align: top; padding-top: 13px;}

View File

@@ -276,6 +276,7 @@ $(function()
if($(this).prop('checked')) if($(this).prop('checked'))
{ {
$('#budget').val('').attr('disabled', 'disabled'); $('#budget').val('').attr('disabled', 'disabled');
budgetOverrunTips(budgetBalance);
} }
else else
{ {
@@ -322,6 +323,6 @@ function setBudgetTipsAndAclList(programID)
*/ */
function budgetOverrunTips(budgetLeft) function budgetOverrunTips(budgetLeft)
{ {
var budget = $('#budget').val(); var budget = $('#budget').val();
budget > budgetLeft ? $('#programBudget').removeClass('hidden') : $('#programBudget').addClass('hidden'); budget != 0 && budget !== null && budget > budgetLeft ? $('#programBudget').removeClass('hidden') : $('#programBudget').addClass('hidden');
} }

View File

@@ -39,6 +39,7 @@
<?php js::set('PGMParentBudget', $lang->program->parentBudget);?> <?php js::set('PGMParentBudget', $lang->program->parentBudget);?>
<?php js::set('future', $lang->project->future);?> <?php js::set('future', $lang->project->future);?>
<?php js::set('programList', $programList);?> <?php js::set('programList', $programList);?>
<?php js::set('budgetBalance', $budgetLeft);?>
<?php $aclList = $parentProgram ? $lang->program->subAclList : $lang->program->aclList;?> <?php $aclList = $parentProgram ? $lang->program->subAclList : $lang->program->aclList;?>
<?php $requiredFields = $config->program->create->requiredFields;?> <?php $requiredFields = $config->program->create->requiredFields;?>
<div id='mainContent' class='main-content'> <div id='mainContent' class='main-content'>
@@ -81,9 +82,9 @@
</div> </div>
<span id='programBudget' class='text-remind hidden'><?php echo $lang->program->budgetOverrun;?></span> <span id='programBudget' class='text-remind hidden'><?php echo $lang->program->budgetOverrun;?></span>
</td> </td>
<td class='undetermined'> <td class='futureBox'>
<div class='checkbox-primary future w-70px'> <div class='checkbox-primary future w-70px'>
<input type='checkbox' id='future' name='future' value='1' /> <input type='checkbox' id='future' name='future' value='1' />
<label for='future'><?php echo $lang->project->future;?></label> <label for='future'><?php echo $lang->project->future;?></label>
</div> </div>
</td> </td>

View File

@@ -62,7 +62,7 @@
</div> </div>
<span id='programBudget' class='text-remind hidden'><?php echo $lang->program->budgetOverrun;?></span> <span id='programBudget' class='text-remind hidden'><?php echo $lang->program->budgetOverrun;?></span>
</td> </td>
<td class='undetermined'> <td class='futureBox'>
<div class='checkbox-primary future w-70px'> <div class='checkbox-primary future w-70px'>
<input type='checkbox' id='future' name='future' value='1' <?php if($program->budget == 0) echo 'checked';?> /> <input type='checkbox' id='future' name='future' value='1' <?php if($program->budget == 0) echo 'checked';?> />
<label for='future'><?php echo $lang->project->future;?></label> <label for='future'><?php echo $lang->project->future;?></label>