MDL-19808 Converted calls to popup_form()

This commit is contained in:
nicolasconnault
2009-08-10 03:36:42 +00:00
parent fd21e467e5
commit 9fc666e5e7
2 changed files with 14 additions and 6 deletions
+8 -4
View File
@@ -206,15 +206,19 @@
}
$section = $forumcm->sectionnum;
if ($forumcm->instance != $forum->id) {
$url = "discuss.php?d=$discussion->id&move=$forumcm->instance&sesskey=".sesskey();
$url = "discuss.php?d=$discussion->id&move=$forumcm->instance&sesskey=".sesskey();
$forummenu[$url] = format_string($forumcm->name);
}
}
if (!empty($forummenu)) {
echo "<div style=\"float:right;\">";
echo popup_form("$CFG->wwwroot/mod/forum/", $forummenu, "forummenu", "",
get_string("movethisdiscussionto", "forum"), "", "", true,'self','',NULL,
get_string('move'),false,true);
$select = moodle_select::make_popup_form('', '', $forummenu, 'forummenu');
$select->nothinglabel = get_string("movethisdiscussionto", "forum");
$select->form->button->text = get_string('move');
$select->override_option_values($forummenu);
echo $OUTPUT->select($select);
echo "</div>";
}
}
+6 -2
View File
@@ -4134,12 +4134,16 @@ function forum_print_rating_menu($postid, $userid, $scale, $myrating=NULL) {
* @param string $forumtype optional
*/
function forum_print_mode_form($id, $mode, $forumtype='') {
global $OUTPUT;
$select = moodle_select::make_popup_form("view.php?f=$id", 'mode', forum_get_layout_modes(), "mode", $mode);
$select->nothinglabel = false;
if ($forumtype == 'single') {
echo '<div class="forummode">';
popup_form("view.php?f=$id&amp;mode=", forum_get_layout_modes(), "mode", $mode, "");
echo $OUTPUT->select($select);
echo '</div>';
} else {
popup_form("discuss.php?d=$id&amp;mode=", forum_get_layout_modes(), "mode", $mode, "");
echo $OUTPUT->select($select);
}
}