X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FTextArea.class.php;h=5d48466853b8fcb8537e340724bc71b41f633dbd;hb=6612729419c6637b8f962ba8621c2c2a2179cbcd;hp=9cfd431580463d1e32c9c096f4b44bb2665116d9;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 9cfd4315..5d484668 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -29,33 +29,30 @@ import('form.FormElement'); class TextArea extends FormElement { - var $mValue; - var $mPassword = false; var $mColumns = ""; var $mRows = ""; - var $cClassName = "TextArea"; + var $mOnKeyPress = ""; + + function __construct($name) + { + $this->class = 'TextArea'; + $this->name = $name; + } - function TextArea($name,$value="") - { - $this->mName = $name; - $this->mValue = $value; - } - function setColumns($value) { $this->mColumns = $value; } function getColumns() { return $this->mColumns; } function setRows($value) { $this->mRows = $value; } function getRows() { return $this->mRows; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - - if ($this->mId=="") $this->mId = $this->mName; + function getHtml() { + + if ($this->id=="") $this->id = $this->mName; $js_maxlen = ""; $html = "\n\tmName\" id=\"$this->mId\""; + $html .= " name=\"$this->name\" id=\"$this->id\""; if ($this->mColumns!="") $html .= " cols=\"$this->mColumns\""; @@ -63,15 +60,15 @@ class TextArea extends FormElement { if ($this->mRows!="") $html .= " rows=\"$this->mRows\""; - if ($this->mMaxLength!="") { + if ($this->max_length!="") { if ($this->mOnKeyPress) $this->mOnKeyPress .= ";"; - $this->mOnKeyPress .= "return validateMaxLenght_".$this->mName."(this, event);"; + $this->mOnKeyPress .= "return validateMaxLenght_".$this->name."(this, event);"; $js_maxlen = $this->getExtraScript(); - $html .= " maxlength=\"$this->mMaxLength\""; + $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\""; @@ -86,8 +83,8 @@ class TextArea extends FormElement { function getExtraScript() { $s = "