2 require_once("HTML/QuickForm/static.php");
5 * HTML class for a text type element
10 class MoodleQuickForm_static
extends HTML_QuickForm_static
{
11 var $_elementTemplateType='static';
13 * html for help button, if empty then no help
19 * set html for help button
22 * @param array $help array of arguments to make a help button
23 * @param string $function function name to call to get html
25 function setHelpButton($helpbuttonargs, $function='helpbutton'){
26 if (!is_array($helpbuttonargs)){
27 $helpbuttonargs=array($helpbuttonargs);
29 $helpbuttonargs=$helpbuttonargs;
31 //we do this to to return html instead of printing it
32 //without having to specify it in every call to make a button.
33 if ('helpbutton' == $function){
34 $defaultargs=array('', '', 'moodle', true, false, '', true);
35 $helpbuttonargs=$helpbuttonargs +
$defaultargs ;
37 $this->_helpbutton
=call_user_func_array($function, $helpbuttonargs);
40 * get html for help button
43 * @return string html for help button
45 function getHelpButton(){
46 return $this->_helpbutton
;
49 function getElementTemplateType(){
50 return $this->_elementTemplateType
;