| | 732 | class gui_textarea extends guiinput { |
|---|
| | 733 | function gui_textarea($elemname, $currentvalue = '', $prompttext = '', $helptext = '', $jsvalidation = '', $failvalidationmsg = '', $canbeempty = true, $maxchars = 0) { |
|---|
| | 734 | // call parent class contructor |
|---|
| | 735 | $parent_class = get_parent_class($this); |
|---|
| | 736 | parent::$parent_class($elemname, $currentvalue, $prompttext, $helptext, $jsvalidation, $failvalidationmsg, $canbeempty); |
|---|
| | 737 | |
|---|
| | 738 | $maxlength = ($maxchars > 0) ? " maxlength=\"$maxchars\"" : ''; |
|---|
| | 739 | |
|---|
| | 740 | $list = explode("\n",$this->currentvalue); |
|---|
| | 741 | $rows = count($list); |
|---|
| | 742 | $rows = (($rows > 20) ? 20 : $rows); |
|---|
| | 743 | |
|---|
| | 744 | $this->html_input = "<textarea rows=\"$rows\" cols=\"24\" name=\"$this->_elemname\" id=\"$this->_elemname\"$maxlength>" . htmlentities($this->currentvalue) . "</textarea>"; |
|---|
| | 745 | } |
|---|
| | 746 | } |
|---|
| | 747 | |
|---|