X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FUploadFile.class.php;h=50e8aad561554161c84751f78e68e12ee5b0cb25;hb=f787edd7045299de3885c052d243b446f7324ea0;hp=97a2a8ca12b41c3b88b1252cdbaa6f446819125a;hpb=cb8e3de960b758147b34d8323054e7de70548619;p=timetracker.git diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index 97a2a8ca..50e8aad5 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -29,30 +29,23 @@ import('form.FormElement'); class UploadFile extends FormElement { - var $cClassName = "UploadFile"; - var $mMaxSize = 100000; // 100kb - function __construct($name,$value="") - { - $this->name = $name; - $this->value = $value; - } - - function setMaxSize($value) { $this->mMaxSize = $value; } - function getMaxSize() { return $this->mMaxSize; } - - function toStringControl() { - if (!$this->isRenderable()) return ""; - - if ($this->id=="") $this->id = $this->name; - - $html = "\n\tmMaxSize."\"/>"; - $html .= "\n\tname\" id=\"$this->id\""; - - $html .= " type=\"file\""; - $html .= ">"; + var $maxSize = 8388608; // 8MB default max size. + + function __construct($name) + { + $this->class = 'UploadFile'; + $this->name = $name; + } + + function setMaxSize($value) { $this->maxSize = $value; } + + function getHtml() { + + if ($this->id == '') $this->id = $this->name; - return $html; - } + $html = "\n\tmaxSize\">"; + $html .= "\n\tid\" name=\"$this->name\">"; + return $html; + } }