]> git.mjollnir.org Git - moodle.git/commitdiff
Added a 4th OPTIONAL (default "get") parameter to
authorstronk7 <stronk7>
Sun, 18 May 2003 16:41:23 +0000 (16:41 +0000)
committerstronk7 <stronk7>
Sun, 18 May 2003 16:41:23 +0000 (16:41 +0000)
"print_single_button" function. Now can make "post"
forms too.

lib/weblib.php

index 81b386be0fb0c8dd07adf6614027a48ee725ec28..2ad2651fbb1229ab9bd756692f0ee3719eb031bc 100644 (file)
@@ -804,8 +804,8 @@ function print_simple_box_end() {
     echo "</td></tr></table>";
 }
 
-function print_single_button($link, $options, $label="OK") {
-    echo "<form action=\"$link\" method=get>";
+function print_single_button($link, $options, $label="OK", $method="get") {
+    echo "<form action=\"$link\" method=\"$method\">";
     if ($options) {
         foreach ($options as $name => $value) {
             echo "<input type=hidden name=\"$name\" value=\"$value\">";