$output .= html_writer::select($select->options, $select->name, $select->selected, $select->nothing, $select->attributes);
$go = html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('go')));
- $output .= html_writer::tag('noscript', html_writer::tag('div', $go), array('style'=>'inline'));
+ $output .= html_writer::tag('noscript', html_writer::tag('div', $go), array('class' => 'inline'));
$nothing = empty($select->nothing) ? false : key($select->nothing);
- $this->page->requires->js_init_call('M.util.init_select_autosubmit', array($select->formid, $select->attributes['id'], $nothing));
+ $this->page->requires->yui_module('moodle-core-formautosubmit',
+ 'M.core.init_formautosubmit',
+ array(array('selectid' => $select->attributes['id'], 'nothing' => $nothing))
+ );
// then div wrapper for xhtml strictness
$output = html_writer::tag('div', $output);
if (!$select->showbutton) {
$go = html_writer::empty_tag('input', array('type'=>'submit', 'value'=>get_string('go')));
- $output .= html_writer::tag('noscript', html_writer::tag('div', $go), array('style'=>'inline'));
+ $output .= html_writer::tag('noscript', html_writer::tag('div', $go), array('class' => 'inline'));
$nothing = empty($select->nothing) ? false : key($select->nothing);
- $output .= $this->page->requires->js_init_call('M.util.init_select_autosubmit', array($select->formid, $select->attributes['id'], $nothing));
+ $this->page->requires->yui_module('moodle-core-formautosubmit',
+ 'M.core.init_formautosubmit',
+ array(array('selectid' => $select->attributes['id'], 'nothing' => $nothing))
+ );
} else {
$output .= html_writer::empty_tag('input', array('type'=>'submit', 'value'=>$select->showbutton));
}