Permalink
Browse files

print_continue() to print continue

  • Loading branch information...
1 parent 04eba58 commit dbcb136a6973dbab73ec4e72731f95d713c32a6d martin committed Aug 3, 2002
Showing with 16 additions and 3 deletions.
  1. +16 −3 lib/moodlelib.php
View
@@ -65,6 +65,17 @@ function print_heading($text, $align="CENTER", $size=3) {
echo "<P ALIGN=\"$align\"><FONT SIZE=\"$size\"><B>$text</B></FONT></P>";
}
+function print_continue($link) {
+ global $HTTP_REFERER;
+
+ if (!$link) {
+ $link = $HTTP_REFERER;
+ }
+
+ print_heading("<A HREF=\"$link\">".get_string("continue")."</A>");
+}
+
+
function print_simple_box($message, $align="", $width="", $color="#FFFFFF", $padding=5, $border=1) {
print_simple_box_start($align, $width, $color, $padding, $border);
echo "<P>$message</P>";
@@ -93,8 +104,10 @@ function print_simple_box_end() {
function print_single_button($link, $options, $label="OK") {
echo "<FORM ACTION=\"$link\" METHOD=GET>";
- foreach ($options as $name => $value) {
- echo "<INPUT TYPE=hidden NAME=\"$name\" VALUE=\"$value\">";
+ if ($options) {
+ foreach ($options as $name => $value) {
+ echo "<INPUT TYPE=hidden NAME=\"$name\" VALUE=\"$value\">";
+ }
}
echo "<INPUT TYPE=submit VALUE=\"$label\"></FORM>";
}
@@ -353,7 +366,7 @@ function error ($message, $link="") {
$link = "$CFG->wwwroot";
}
}
- print_heading("<A HREF=\"$link\">Continue</A>");
+ print_continue($link);
print_footer();
die;
}

0 comments on commit dbcb136

Please sign in to comment.