X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FTextArea.class.php;h=be884f0d88d1a2628c623b1db16b9df2d26ec601;hb=040c6516659e15f360159859b783e3722e86f370;hp=5d48466853b8fcb8537e340724bc71b41f633dbd;hpb=4fdb2cd8b1c8990a7ea8ed40b275dc51174e6585;p=timetracker.git diff --git a/WEB-INF/lib/form/TextArea.class.php b/WEB-INF/lib/form/TextArea.class.php index 5d484668..be884f0d 100644 --- a/WEB-INF/lib/form/TextArea.class.php +++ b/WEB-INF/lib/form/TextArea.class.php @@ -29,8 +29,6 @@ import('form.FormElement'); class TextArea extends FormElement { - var $mColumns = ""; - var $mRows = ""; var $mOnKeyPress = ""; function __construct($name) @@ -39,31 +37,17 @@ class TextArea extends FormElement { $this->name = $name; } - function setColumns($value) { $this->mColumns = $value; } - function getColumns() { return $this->mColumns; } - - function setRows($value) { $this->mRows = $value; } - function getRows() { return $this->mRows; } - function getHtml() { - if ($this->id=="") $this->id = $this->mName; - - $js_maxlen = ""; + 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\""; } @@ -75,26 +59,7 @@ class TextArea extends FormElement { } $html .= ">".htmlspecialchars($this->getValue()).""; - if ($js_maxlen) $html = $js_maxlen."\n".$html; return $html; } - - function getExtraScript() { - $s = "\n"; - return $s; - } }