forked from extern/egroupware
support for html5 multiple upload
This commit is contained in:
parent
25b81ce4da
commit
9f94f1f8e3
@ -1670,12 +1670,13 @@ class etemplate extends boetemplate
|
|||||||
self::$form_options .= ' enctype="multipart/form-data"';
|
self::$form_options .= ' enctype="multipart/form-data"';
|
||||||
if (strpos($options,'onChange="') !== false)
|
if (strpos($options,'onChange="') !== false)
|
||||||
{
|
{
|
||||||
$options = preg_replace('/onChange="([^"]+)"/i','onChange="\\1; add_upload(this);"',$options);
|
$options = preg_replace('/onChange="([^"]+)"/i','onChange="\\1; if (!this.multiple) add_upload(this);"',$options);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$options .= ' onChange="add_upload(this);"';
|
$options .= ' onChange="if (!this.multiple) add_upload(this);"';
|
||||||
}
|
}
|
||||||
|
$options .= ' multiple="multiple"'; // allow html5 browsers to select more then one file
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user