Add the warnings back in! eeek!

This commit is contained in:
james 2010-11-22 19:00:41 +00:00
parent d0d9fe4d60
commit c098354179

View File

@ -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){
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>