X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FUploadFile.class.php;h=c3a32763a623d16687a5cfb82a3810c80240319f;hb=443346587eb47046e4a5a4624bcb125c665cf615;hp=ad3f21fa4854ecd94e60d147464dde49e2d72dd1;hpb=33399ff6a8bdfe9b989810dafe9c4dbf3cf3b685;p=timetracker.git diff --git a/WEB-INF/lib/form/UploadFile.class.php b/WEB-INF/lib/form/UploadFile.class.php index ad3f21fa..c3a32763 100644 --- a/WEB-INF/lib/form/UploadFile.class.php +++ b/WEB-INF/lib/form/UploadFile.class.php @@ -29,40 +29,29 @@ import('form.FormElement'); class UploadFile extends FormElement { - var $mValue; var $cClassName = "UploadFile"; var $mMaxSize = 100000; // 100kb - function UploadFile($name,$value="") + function __construct($name,$value="") { - $this->mName = $name; - $this->mValue = $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->mId=="") $this->mId = $this->mName; + function toStringControl() { + + if ($this->id=="") $this->id = $this->name; $html = "\n\tmMaxSize."\"/>"; $html .= "\n\tmName\" id=\"$this->mId\""; + $html .= " name=\"$this->name\" id=\"$this->id\""; $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; + + return $html; } }