/// Print form and popup menu
echo '<div style="text-align:center">'.$strmoodleversion.' ';
- popup_form("$CFG->wwwroot/$CFG->admin/environment.php?version=",
- $versions, 'selectversion', $version, '');
+ $select = moodle_select::make_popup_form("$CFG->wwwroot/$CFG->admin/environment.php", 'version', $versions, 'selectversion', $version);
+ $select->nothinglabel = false;
+ echo $OUTPUT->select($select);
echo '</div>';
/// End of main box
}
// Disable/off/on
- $row[] = popup_form(action_url($filter, 'setstate') . '&newstate=', $activechoices,
- 'active' . basename($filter), $filterinfo->active, '', '', '', true, 'self', '', NULL, get_string('save', 'admin'));
+ $select = moodle_select::make_popup_form(action_url($filter, 'setstate'), 'newstate', $activechoices, 'active' . basename($filter), $filterinfo->active);
+ $select->nothinglabel = false;
+ $select->form->button->text = get_string('save', 'admin');
+ $row[] = $OUTPUT->select($select);
// Re-order
$updown = '';
$row[] = $updown;
// Apply to strings.
- $row[] = popup_form(action_url($filter, 'setapplyto') . '&stringstoo=', $applytochoices,
- 'applyto' . basename($filter), $applytostrings, '', '', '', true, 'self', '', NULL, get_string('save', 'admin'),
- $filterinfo->active == TEXTFILTER_DISABLED);
+ $select = moodle_select::make_popup_form(action_url($filter, 'setapplyto'), 'stringstoo', $applytochoices, 'applyto' . basename($filter), $applytostrings);
+ $select->nothinglabel = false;
+ $select->disabled = $filterinfo->active == TEXTFILTER_DISABLED;
+ $select->form->button->text = get_string('save', 'admin');
+ $row[] = $OUTPUT->select($select);
// Settings link, if required
if (filter_has_global_settings($filter)) {
print_box_start();
$currlang = current_language();
$langs = get_list_of_languages(false, true);
- popup_form ("$CFG->wwwroot/$CFG->admin/lang.php?lang=", $langs, "chooselang", $currlang, "", "", "", false, 'self', $strcurrentlanguage.':');
+ $select = moodle_select::make_popup_form("$CFG->wwwroot/$CFG->admin/lang.php", 'lang', $langs, "chooselang", $currlang);
+ $select->nothinglabel = false;
+ $select->set_label($strcurrentlanguage.':');
+ echo $OUTPUT->select($select);
print_box_end();
echo $OUTPUT->footer();
exit;
//$selectionlabel .= $strfilestoredin;
$selectionlabel .= $uselocal ? "{$currentlang}_local" : $currentlang;
$selectionlabel .= '/</code>';
- popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=compare&currentfile=", $menufiles, "choosefile",
- $currentfile, $strchoosefiletoedit, '', '', false, 'self', $selectionlabel);
+ $select = moodle_select::make_popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=compare", 'currentfile', $menufiles, "choosefile", $currentfile);
+ $select->nothinglabel = $strchoosefiletoedit;
+ $select->set_label($selectionlabel);
+ echo $OUTPUT->select($select);
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
print_box_end();
//$selectionlabel .= $strfilestoredin;
$selectionlabel .= $uselocal ? "{$currentlang}_local" : $currentlang;
$selectionlabel .= '/help/</code>';
- popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=helpfiles&currentfile=", $menufiles, "choosefile",
- $currentfile, $strchoosefiletoedit, '', '', false, 'self', $selectionlabel);
+ $select = moodle_select::make_popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=helpfiles", 'currentfile', $menufiles, "choosefile", $currentfile);
+ $select->nothinglabel = $strchoosefiletoedit;
+ $select->set_label($selectionlabel);
+ echo $OUTPUT->select($select);
helpbutton('langswitchstorage', $strfilestoredinhelp, 'moodle');
print_box_end();
/// Print a form to swap roles, and a link back to the all roles list.
echo '<div class="backlink">';
- popup_form($baseurl . '&roleid=', $nameswithcounts, 'switchrole',
- $roleid, '', '', '', false, 'self', get_string('assignanotherrole', 'role'));
+ $select = moodle_select::make_popup_form($baseurl, 'roleid', $nameswithcounts, 'switchrole', $roleid);
+ $select->set_label(get_string('assignanotherrole', 'role'));
+ $select->nothinglabel = false;
+ echo $OUTPUT->select($select);
echo '<p><a href="' . $baseurl . '">' . get_string('backtoallroles', 'role') . '</a></p>';
echo '</div>';
/// Print a form to swap roles, and a link back to the all roles list.
echo '<div class="backlink">';
- popup_form($baseurl . '&roleid=', $nameswithcounts, 'switchrole',
- $roleid, '', '', '', false, 'self', get_string('overrideanotherrole', 'role'));
+ $select = moodle_select::make_popup_form($baseurl, 'roleid', $nameswithcounts, 'switchrole', $roleid);
+ $select->set_label(get_string('overrideanotherrole', 'role'));
+ $select->nothinglabel = false;
+ echo $OUTPUT->select($select);
echo '<p><a href="' . $baseurl . '">' . get_string('backtoallroles', 'role') . '</a></p>';
echo '</div>';