mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
widgets should NEVER return null (eg. for empty), as server-side $preserv will overwrite it
This commit is contained in:
parent
5d3d61e5b0
commit
5a32a7d622
@ -70,13 +70,9 @@ 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 (is_null($value))
|
|
||||||
{
|
|
||||||
$valid = null;
|
|
||||||
}
|
|
||||||
elseif ($this->type == 'date-duration')
|
elseif ($this->type == 'date-duration')
|
||||||
{
|
{
|
||||||
$valid = $value;
|
$valid = (string)$value === '' ? '' : (int)$value;
|
||||||
}
|
}
|
||||||
elseif (empty($this->attrs['dataformat'])) // integer timestamp
|
elseif (empty($this->attrs['dataformat'])) // integer timestamp
|
||||||
{
|
{
|
||||||
|
@ -475,7 +475,7 @@ var et2_date_duration = et2_date.extend(
|
|||||||
var value = this.duration.val().replace(',', '.');
|
var value = this.duration.val().replace(',', '.');
|
||||||
if(value === '')
|
if(value === '')
|
||||||
{
|
{
|
||||||
return this.options.empty_not_0 ? null : 0;
|
return this.options.empty_not_0 ? '' : 0;
|
||||||
}
|
}
|
||||||
// Put value into minutes for further processing
|
// Put value into minutes for further processing
|
||||||
switch(this.format ? this.format.val() : this.options.display_format)
|
switch(this.format ? this.format.val() : this.options.display_format)
|
||||||
|
Loading…
Reference in New Issue
Block a user