3 require_once "$CFG->libdir/form/select.php";
6 * HTML class for a simple yes/ no drop down element
11 class MoodleQuickForm_selectyesno
extends MoodleQuickForm_select
{
17 * @param string Select name attribute
18 * @param mixed Label(s) for the select
19 * @param mixed Either a typical HTML attribute string or an associative array
20 * @param mixed $options ignored
24 function MoodleQuickForm_selectyesno($elementName=null, $elementLabel=null, $attributes=null, $options=null)
26 HTML_QuickForm_element
::HTML_QuickForm_element($elementName, $elementLabel, $attributes, null);
27 $this->_type
= 'selectyesno';
32 * Called by HTML_QuickForm whenever form event is made on this element
34 * @param string $event Name of event
35 * @param mixed $arg event arguments
36 * @param object $caller calling object
41 function onQuickFormEvent($event, $arg, &$caller)
46 $choices[0] = get_string('no');
47 $choices[1] = get_string('yes');
48 $this->load($choices);
51 return parent
::onQuickFormEvent($event, $arg, $caller);