2 require_once('HTML/QuickForm/password.php');
5 * HTML class for a password type element
10 class MoodleQuickForm_password
extends HTML_QuickForm_password
{
12 * html for help button, if empty then no help
18 * set html for help button
21 * @param array $help array of arguments to make a help button
22 * @param string $function function name to call to get html
24 function setHelpButton($helpbuttonargs, $function='helpbutton'){
25 if (!is_array($helpbuttonargs)){
26 $helpbuttonargs=array($helpbuttonargs);
28 $helpbuttonargs=$helpbuttonargs;
30 //we do this to to return html instead of printing it
31 //without having to specify it in every call to make a button.
32 if ('helpbutton' == $function){
33 $defaultargs=array('', '', 'moodle', true, false, '', true);
34 $helpbuttonargs=$helpbuttonargs +
$defaultargs ;
36 $this->_helpbutton
=call_user_func_array($function, $helpbuttonargs);
39 * get html for help button
42 * @return string html for help button
44 function getHelpButton(){
45 return $this->_helpbutton
;