diff --git a/admin/environment.php b/admin/environment.php
index e819844597d..93c8bf043bd 100644
--- a/admin/environment.php
+++ b/admin/environment.php
@@ -121,8 +121,9 @@
/// Print form and popup menu
echo '
'.$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 '
';
/// End of main box
diff --git a/admin/filters.php b/admin/filters.php
index 30ce0402c60..45a72fd8ffd 100644
--- a/admin/filters.php
+++ b/admin/filters.php
@@ -248,8 +248,10 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
}
// 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 = '';
@@ -269,9 +271,11 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
$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)) {
diff --git a/admin/lang.php b/admin/lang.php
index c446c1c901f..55ca4156e17 100644
--- a/admin/lang.php
+++ b/admin/lang.php
@@ -140,7 +140,10 @@
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;
@@ -491,8 +494,10 @@
//$selectionlabel .= $strfilestoredin;
$selectionlabel .= $uselocal ? "{$currentlang}_local" : $currentlang;
$selectionlabel .= '/';
- popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=compare¤tfile=", $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();
@@ -756,8 +761,10 @@
//$selectionlabel .= $strfilestoredin;
$selectionlabel .= $uselocal ? "{$currentlang}_local" : $currentlang;
$selectionlabel .= '/help/';
- popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=helpfiles¤tfile=", $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();
diff --git a/admin/roles/assign.php b/admin/roles/assign.php
index 8697675b06c..6debd8642b9 100755
--- a/admin/roles/assign.php
+++ b/admin/roles/assign.php
@@ -373,8 +373,10 @@
/// Print a form to swap roles, and a link back to the all roles list.
echo '';
- 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 '
' . get_string('backtoallroles', 'role') . '
';
echo '
';
diff --git a/admin/roles/override.php b/admin/roles/override.php
index 0f324479228..b762d7ec1ae 100755
--- a/admin/roles/override.php
+++ b/admin/roles/override.php
@@ -231,8 +231,10 @@
/// Print a form to swap roles, and a link back to the all roles list.
echo '';
- 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 '
' . get_string('backtoallroles', 'role') . '
';
echo '
';