re-added validation for null as it is needed/used by widget-types other then duration

This commit is contained in:
Ralf Becker 2014-06-12 07:51:41 +00:00
parent f3ba7f692f
commit febc2f8763

View File

@ -70,6 +70,10 @@ class etemplate_widget_date extends etemplate_widget_transformer
{
self::set_validation_error($form_name,lang('Field must not be empty !!!'));
}
elseif (is_null($value))
{
$valid = null;
}
elseif ($this->type == 'date-duration')
{
$valid = (string)$value === '' ? '' : (int)$value;
@ -83,11 +87,6 @@ class etemplate_widget_date extends etemplate_widget_transformer
{
// Nothing to do here
}
// Null is acceptable also
elseif ($value === null)
{
$valid = $value;
}
else
{
// this is not really a user error, but one of the clientside engine