X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/5532fe6cfc2125063ff8040cfa80e20089ac64b0..076f64bf058fdda95d95428c95d3acfbbdf93448:/WEB-INF/lib/form/UploadFile.class.php diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index c3a32763..50e8aad5 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -29,29 +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() { + 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; - - $html = "\n\tmMaxSize."\"/>"; - $html .= "\n\tname\" id=\"$this->id\""; - - $html .= " type=\"file\""; - $html .= ">"; + if ($this->id == '') $this->id = $this->name; - return $html; - } + $html = "\n\tmaxSize\">"; + $html .= "\n\tid\" name=\"$this->name\">"; + return $html; + } }