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.= ''.$p->t('global/bezeichnung').''; -$content_form.= ''.$p->t('global/von').' '; +$content_form.= ''.$p->t('global/von').' '; //dropdown fuer vonstunde $content_form.= $p->t('zeitsperre/stundeInklusive'); @@ -715,7 +748,7 @@ for($i=0;$i<$num_rows_stunde;$i++) $content_form.= ""; -$content_form.= ''.$p->t('global/bis').' '; +$content_form.= ''.$p->t('global/bis').' '; //dropdown fuer bisstunde $content_form.= $p->t('zeitsperre/stundeInklusive'); $content_form.= " "; + else $content_form.= ""; $content_form.= ''; $content_form .= ' '; -$content_form.= "".$p->t('zeitsperre/achtungEsWerdenAlleEingegebenenTage').""; +$content_form.= "" .$p->t('zeitsperre/achtungEsWerdenAlleEingegebenenTage').""; $content_form.= ''; echo ''; @@ -794,3 +828,4 @@ echo '
'; +showHideStudeDropDown();'; ?> diff --git a/cis/private/tools/zeitaufzeichnung.php b/cis/private/tools/zeitaufzeichnung.php index 70874950d..2a7939e17 100644 --- a/cis/private/tools/zeitaufzeichnung.php +++ b/cis/private/tools/zeitaufzeichnung.php @@ -1,5 +1,5 @@ @@ -213,6 +221,7 @@ echo '