allow to use numbers for attributes of type string, silently convert them to strings, fixes not working blur values for quantity in timesheet

This commit is contained in:
Ralf Becker 2014-06-12 08:25:31 +00:00
parent febc2f8763
commit 0b6fa2785b

View File

@ -155,6 +155,11 @@ function et2_checkType(_val, _type, _attr, _widget)
// Check whether the given value is of the type "string"
if (_type == "string" || _type == "html")
{
if (typeof _val == "number") // as php is a bit vague here, silently convert to a string
{
return _val.toString();
}
if (typeof _val == "string")
{
return _type == "html" ? _val : html_entity_decode(_val);