summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2009-04-30 08:51:32 +0000
committerdeva <deva>2009-04-30 08:51:32 +0000
commit9e478026e37b67a0c29ad6dcf3d65fdc491c90d4 (patch)
tree209486b30f23202ed613f89c61baf58d11297520
parent9100caa95aff02de93a1b0fae5677a6fd7ac952a (diff)
TextEdit gains 'lines' attribute.
-rw-r--r--utils/forms.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/forms.php b/utils/forms.php
index 2d34861..5694c03 100644
--- a/utils/forms.php
+++ b/utils/forms.php
@@ -128,18 +128,19 @@ class Hidden {
class TextEdit {
public $label, $name, $value;
- function TextEdit($label, $name, $value = "")
+ function TextEdit($label, $name, $value = "", $lines = "20")
{
$this->label = $label;
$this->name = $name;
$this->value = $value;
+ $this->lines = $lines;
}
function render($indent = "")
{
$str = $indent . "<div class=\"input\">\n";
$str .= $indent . " <div class=\"label\">". $this->label ."</div>\n";
- $str .= $indent . " <div class=\"widget\"><textarea class=\"textedit\" name=\"vars[".$this->name."]\">".$this->value."</textarea></div>\n";
+ $str .= $indent . " <div class=\"widget\"><textarea rows=\"".$this->lines."\" class=\"textedit\" name=\"vars[".$this->name."]\">".$this->value."</textarea></div>\n";
$str .= $indent . "</div>\n";
return $str;
}