diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index 5812d8af6..6ceaff350 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -200,7 +200,7 @@ function checkdatum() return false; } - var Datum, Tag, Monat,Jahr,vonDatum,bisDatum; + var Datum, Tag, Monat,Jahr,vonDatum,bisDatum, diff; Datum=document.getElementById('vondatum').value; Tag=Datum.substring(0,2); @@ -230,12 +230,23 @@ function checkdatum() bisDatum=Jahr+''+Monat+''+Tag; + diff=bisDatum-vonDatum; + if (vonDatum>bisDatum) { alert('t('zeitsperre/vonDatum');?> '+ document.getElementById('vondatum').value+ ' t('zeitsperre/istGroesserAlsBisDatum');?> '+document.getElementById('bisdatum').value); document.getElementById('vondatum').focus(); return false; } + else if (diff>14) + { + Check = confirm('t('zeitaufzeichnung/zeitraumAuffallendHoch');?>'); + document.getElementById('bisdatum').focus(); + if (Check == false) + return false; + else + return true; + } return true; } @@ -274,6 +285,8 @@ function showHideBezeichnungDropDown() document.getElementById('resturlaub').style.visibility = 'visible'; else document.getElementById('resturlaub').style.visibility = 'hidden'; + + showHideStudeDropDown() } function setBisDatum() @@ -281,6 +294,26 @@ function setBisDatum() document.zeitsperre_form.bisdatum.value = document.zeitsperre_form.vondatum.value; } +function showHideStudeDropDown() +{ + var dd = document.zeitsperre_form.zeitsperretyp_kurzbz; + + if (dd.options[dd.selectedIndex].value == 'ZA' + || dd.options[dd.selectedIndex].value == 'Urlaub' + || dd.options[dd.selectedIndex].value == 'Krank' + || dd.options[dd.selectedIndex].value == 'DienstF' + || dd.options[dd.selectedIndex].value == 'DienstV') + { + document.getElementById('vonStd').style.visibility = 'hidden'; + document.getElementById('bisStd').style.visibility = 'hidden'; + } + else + { + document.getElementById('vonStd').style.visibility = 'visible'; + document.getElementById('bisStd').style.visibility = 'visible'; + } +} + @@ -693,7 +726,7 @@ if($result = $db->db_query($qry)) } $content_form.= ''; $content_form.= '