2 require_once('HTML/QuickForm/textarea.php');
5 * HTML class for a textarea type element
10 class MoodleQuickForm_textarea
extends HTML_QuickForm_textarea
{
12 * Need to store id of form as we may need it for helpbutton
18 * html for help button, if empty then no help
24 var $_hiddenLabel=false;
26 function MoodleQuickForm_textarea($elementName=null, $elementLabel=null, $attributes=null) {
27 parent
::HTML_QuickForm_textarea($elementName, $elementLabel, $attributes);
30 * set html for help button
33 * @param array $help array of arguments to make a help button
34 * @param string $function function name to call to get html
36 function setHelpButton($helpbuttonargs, $function='helpbutton'){
37 debugging('component setHelpButton() is not used any more, please use $mform->setHelpButton() instead');
40 * get html for help button
43 * @return string html for help button
45 function getHelpButton(){
46 return $this->_helpbutton
;
49 function setHiddenLabel($hiddenLabel){
50 $this->_hiddenLabel
= $hiddenLabel;
54 if ($this->_hiddenLabel
){
56 return '<label class="accesshide" for="' . $this->getAttribute('id') . '" >' .
57 $this->getLabel() . '</label>' . parent
::toHtml();
59 return parent
::toHtml();
64 * Called by HTML_QuickForm whenever form event is made on this element
66 * @param string $event Name of event
67 * @param mixed $arg event arguments
68 * @param object $caller calling object
73 function onQuickFormEvent($event, $arg, &$caller)
77 $this->_formid
= $caller->getAttribute('id');
80 return parent
::onQuickFormEvent($event, $arg, $caller);
81 } // end func onQuickFormEvent
83 * Slightly different container template when frozen.
87 function getElementTemplateType(){
88 if ($this->_flagFrozen
){