X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FTextArea.class.php;h=66101b98d9affb210b06caef49760e2463978fc5;hb=cd5e077ecb497431decde4835138b877d63b261c;hp=887f8ad4c24aeb68d93287012a045bede0314332;hpb=33399ff6a8bdfe9b989810dafe9c4dbf3cf3b685;p=timetracker.git diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 887f8ad4..66101b98 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -29,17 +29,16 @@ import('form.FormElement'); class TextArea extends FormElement { - var $mValue; - var $mPassword = false; var $mColumns = ""; var $mRows = ""; - var $cClassName = "TextArea"; + var $mOnKeyPress = ""; - function TextArea($name,$value="") - { - $this->mName = $name; - $this->mValue = $value; - } + function __construct($name, $value = '') + { + $this->class = 'TextArea'; + $this->name = $name; + $this->value = $value; + } function setColumns($value) { $this->mColumns = $value; } function getColumns() { return $this->mColumns; } @@ -47,15 +46,14 @@ class TextArea extends FormElement { 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 +61,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 +84,8 @@ class TextArea extends FormElement { function getExtraScript() { $s = "