From c33856ee502d96e85dbc33c27921ead80e4c569d Mon Sep 17 00:00:00 2001 From: OliiverHacker Date: Wed, 2 Dec 2020 12:57:54 +0100 Subject: [PATCH] =?UTF-8?q?Zeitsperren:=20User=20bekommt=20Warnhinweis=20b?= =?UTF-8?q?ei=20auff=C3=A4llig=20langem=20Zeitraum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cis/private/profile/zeitsperre_resturlaub.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/cis/private/profile/zeitsperre_resturlaub.php b/cis/private/profile/zeitsperre_resturlaub.php index b7654310e..c85c6f959 100644 --- a/cis/private/profile/zeitsperre_resturlaub.php +++ b/cis/private/profile/zeitsperre_resturlaub.php @@ -180,7 +180,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); @@ -210,12 +210,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; }