mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 01:29:05 +01:00
Fix validation of durations
This commit is contained in:
parent
3d50a2bc4b
commit
868614fd23
@ -79,10 +79,15 @@ class etemplate_widget_date extends etemplate_widget_transformer
|
|||||||
{
|
{
|
||||||
self::set_validation_error($form_name,lang('Field must not be empty !!!'));
|
self::set_validation_error($form_name,lang('Field must not be empty !!!'));
|
||||||
}
|
}
|
||||||
|
elseif ($this->type == 'date-duration')
|
||||||
|
{
|
||||||
|
$valid = $value;
|
||||||
|
}
|
||||||
elseif (empty($this->attrs['dataformat'])) // integer timestamp
|
elseif (empty($this->attrs['dataformat'])) // integer timestamp
|
||||||
{
|
{
|
||||||
$valid = (int)$value;
|
$valid = (int)$value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// string with formatting letters like for php's date() method
|
// string with formatting letters like for php's date() method
|
||||||
elseif (($valid = date($this->attrs['dataformat'], $value)))
|
elseif (($valid = date($this->attrs['dataformat'], $value)))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user