X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=WEB-INF%2Flib%2Fform%2FUploadFile.class.php;h=50e8aad561554161c84751f78e68e12ee5b0cb25;hb=691958794018beda9788e9bdb47d640a116af492;hp=be57fa4c4a2b01362a0957c358d4676f6215bb18;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git
diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php
index be57fa4c..50e8aad5 100644
--- a/WEB-INF/lib/form/UploadFile.class.php
+++ b/WEB-INF/lib/form/UploadFile.class.php
@@ -29,41 +29,23 @@
import('form.FormElement');
class UploadFile extends FormElement {
- var $mValue;
- var $cClassName = "UploadFile";
- var $mMaxSize = 100000; // 100kb
- function UploadFile($name,$value="")
- {
- $this->mName = $name;
- $this->mValue = $value;
- }
-
- function setMaxSize($value) { $this->mMaxSize = $value; }
- function getMaxSize() { return $this->mMaxSize; }
-
- function toStringControl() {
- if (!$this->isRenderable()) return "";
-
- if ($this->mId=="") $this->mId = $this->mName;
-
- $html = "\n\tmMaxSize."\"/>";
- $html .= "\n\tmName\" id=\"$this->mId\"";
-
- $html .= " type=\"file\"";
- $html .= ">";
-
- // only IE
- /*$html = "mName."\" id=\"".$this->mId."\" style=\"display: none;\">\n";
- $html .= "mName."file\">\n";
- $html .= "mName.".click();".$this->mName."file.value=".$this->mName.".value;".$this->mName.".disabled=true;\"";
- $html .= " value=\"".$this->getValue()."\">\n";
- $html .= "mMaxSize."\"/>";*/
-
-
- return $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;
+
+ $html = "\n\tmaxSize\">";
+ $html .= "\n\tid\" name=\"$this->name\">";
+ return $html;
+ }
}
-?>
\ No newline at end of file