MDL-19787 Converted calls to popup_form()

This commit is contained in:
nicolasconnault 2009-08-10 03:35:38 +00:00
parent 82fcab32c1
commit 4784db9a4e
5 changed files with 32 additions and 16 deletions

View File

@ -121,8 +121,9 @@
/// 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

View File

@ -248,8 +248,10 @@ function get_table_row($filterinfo, $isfirstrow, $islastactive, $applytostrings)
}
// Disable/off/on
$row[] = popup_form(action_url($filter, 'setstate') . '&amp;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') . '&amp;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)) {

View File

@ -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 .= '/</code>';
popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=compare&amp;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();
@ -756,8 +761,10 @@
//$selectionlabel .= $strfilestoredin;
$selectionlabel .= $uselocal ? "{$currentlang}_local" : $currentlang;
$selectionlabel .= '/help/</code>';
popup_form("$CFG->wwwroot/$CFG->admin/lang.php?mode=helpfiles&amp;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();

View File

@ -373,8 +373,10 @@
/// Print a form to swap roles, and a link back to the all roles list.
echo '<div class="backlink">';
popup_form($baseurl . '&amp;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>';

View File

@ -231,8 +231,10 @@
/// Print a form to swap roles, and a link back to the all roles list.
echo '<div class="backlink">';
popup_form($baseurl . '&amp;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>';