X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FTextArea.class.php;h=be884f0d88d1a2628c623b1db16b9df2d26ec601;hb=ed41335d63e71a11d30e92f4367106e9398adf9d;hp=8a4e20a5d0c964f1d09555b0712b6a92e230804b;hpb=f73f9902e51376cd8fb327cb49343d3a585f5255;p=timetracker.git diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 8a4e20a5..be884f0d 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -29,75 +29,37 @@ import('form.FormElement'); class TextArea extends FormElement { - var $mPassword = false; - var $mColumns = ""; - var $mRows = ""; - var $cClassName = "TextArea"; var $mOnKeyPress = ""; - function __construct($name,$value="") - { - $this->name = $name; - $this->value = $value; - } - - function setColumns($value) { $this->mColumns = $value; } - function getColumns() { return $this->mColumns; } + function __construct($name) + { + $this->class = 'TextArea'; + $this->name = $name; + } - function setRows($value) { $this->mRows = $value; } - function getRows() { return $this->mRows; } - - function toStringControl() { - if (!$this->isRenderable()) return ""; - - if ($this->id=="") $this->id = $this->mName; - - $js_maxlen = ""; + function getHtml() { + + if (empty($this->id)) + $this->id = $this->name; $html = "\n\tname\" id=\"$this->id\""; - - if ($this->mColumns!="") - $html .= " cols=\"$this->mColumns\""; - - if ($this->mRows!="") - $html .= " rows=\"$this->mRows\""; - + if ($this->max_length!="") { if ($this->mOnKeyPress) $this->mOnKeyPress .= ";"; $this->mOnKeyPress .= "return validateMaxLenght_".$this->name."(this, event);"; - $js_maxlen = $this->getExtraScript(); $html .= " maxlength=\"$this->max_length\""; } - if ($this->mStyle!="") - $html .= " style=\"$this->mStyle\""; + if ($this->style!="") + $html .= " style=\"$this->style\""; if ($this->mOnKeyPress) { $html .= " onkeypress=\"$this->mOnKeyPress\""; } $html .= ">".htmlspecialchars($this->getValue()).""; - if ($js_maxlen) $html = $js_maxlen."\n".$html; return $html; } - - function getExtraScript() { - $s = "\n"; - return $s; - } }