mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Zeitsperren: User bekommt Warnhinweis bei auffällig langem Zeitraum
This commit is contained in:
@@ -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('<?php echo $p->t('zeitsperre/vonDatum');?> '+ document.getElementById('vondatum').value+ ' <?php echo $p->t('zeitsperre/istGroesserAlsBisDatum');?> '+document.getElementById('bisdatum').value);
|
||||
document.getElementById('vondatum').focus();
|
||||
return false;
|
||||
}
|
||||
else if (diff>14)
|
||||
{
|
||||
Check = confirm('<?php echo $p->t('zeitaufzeichnung/zeitraumAuffallendHoch');?>');
|
||||
document.getElementById('bisdatum').focus();
|
||||
if (Check == false)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user