Skip to content

Commit

Permalink
MDL-19808 Converted calls to popup_form()
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Aug 10, 2009
1 parent fd21e46 commit 9fc666e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
12 changes: 8 additions & 4 deletions mod/forum/discuss.php
Expand Up @@ -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>";
}
}
Expand Down
8 changes: 6 additions & 2 deletions mod/forum/lib.php
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 9fc666e

Please sign in to comment.