forked from science-ation/science-ation
Add the warnings back in! eeek!
This commit is contained in:
parent
d0d9fe4d60
commit
c098354179
@ -40,16 +40,23 @@ function draw_body(){
|
||||
?>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
function confirmYearRollover(){
|
||||
var currentyear = <?=$config['FISCALYEAR']?>;
|
||||
var nextyear = document.forms.rollover.nextfiscalyear.value;
|
||||
|
||||
// var okay=confirm('Are you sure you want to roll the FISCALYEAR from '+currentyear+' to '+nextyear+'? This can not be undone and should only be done if you are absolutely sure!');
|
||||
// if(okay){
|
||||
$.post('rolloverfiscal.php', {'action':'rollover', 'year':$('#nextfiscalyear').val()}, function(result){
|
||||
$('#results').html(result);
|
||||
});
|
||||
// }
|
||||
if(nextyear<currentyear)
|
||||
alert('You cannot roll backwards in years!');
|
||||
else if(nextyear==currentyear)
|
||||
alert('You cannot roll to the same year!');
|
||||
else {
|
||||
var okay=confirm('Are you sure you want to roll the FISCALYEAR from '+currentyear+' to '+nextyear+'? This can not be undone and should only be done if you are absolutely sure!');
|
||||
if(okay){
|
||||
$.post('rolloverfiscal.php', {'action':'rollover', 'year':$('#nextfiscalyear').val()}, function(result){
|
||||
$('#results').html(result);
|
||||
});
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user