From 9fc666e5e74478a2c16a374a0fea8ada91404ebc Mon Sep 17 00:00:00 2001 From: nicolasconnault Date: Mon, 10 Aug 2009 03:36:42 +0000 Subject: [PATCH] MDL-19808 Converted calls to popup_form() --- mod/forum/discuss.php | 12 ++++++++---- mod/forum/lib.php | 8 ++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/mod/forum/discuss.php b/mod/forum/discuss.php index 22952587eb..562929a12e 100644 --- a/mod/forum/discuss.php +++ b/mod/forum/discuss.php @@ -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 "
"; - 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 "
"; } } diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 047e30d7c7..f6d94a869b 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -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 '
'; - popup_form("view.php?f=$id&mode=", forum_get_layout_modes(), "mode", $mode, ""); + echo $OUTPUT->select($select); echo '
'; } else { - popup_form("discuss.php?d=$id&mode=", forum_get_layout_modes(), "mode", $mode, ""); + echo $OUTPUT->select($select); } } -- 2.39.5