Permalink
Browse files

Language changes to weblib

  • Loading branch information...
martin
martin committed Aug 12, 2002
1 parent ae35005 commit 618b22c57c9f5f5c82bb362a8d39602870c2d14e
Showing with 11 additions and 2 deletions.
  1. +1 −0 lang/en/moodle.php
  2. +10 −2 lib/weblib.php
View
@@ -25,6 +25,7 @@
$string[changepassword] = "Change password";
$string[changedpassword] = "Changed password";
$string[changessaved] = "Changes saved";
+$string[choose] = "Choose";
$string[choosecourse] = "Choose a course";
$string[chooselivelogs] = "Or watch current activity";
$string[chooselogs] = "Choose which logs you want to see";
View
@@ -145,9 +145,13 @@ function close_window_button() {
}
-function choose_from_menu ($options, $name, $selected="", $nothing="Choose...", $script="", $nothingvalue="0") {
+function choose_from_menu ($options, $name, $selected="", $nothing="choose", $script="", $nothingvalue="0") {
// $options["value"]["label"]
+ if ($nothing == "choose") {
+ $nothing = get_string("choose")."...";
+ }
+
if ($script) {
$javascript = "onChange=\"$script\"";
}
@@ -173,14 +177,18 @@ function choose_from_menu ($options, $name, $selected="", $nothing="Choose...",
echo "</SELECT>\n";
}
-function popup_form ($common, $options, $formname, $selected="", $nothing="Choose...") {
+function popup_form ($common, $options, $formname, $selected="", $nothing="choose") {
// Implements a complete little popup form
// $common = the URL up to the point of the variable that changes
// $options = A list of value-label pairs for the popup list
// $formname = name must be unique on the page
// $selected = the option that is already selected
// $nothing = The label for the "no choice" option
+ if ($nothing == "choose") {
+ $nothing = get_string("choose")."...";
+ }
+
echo "<FORM NAME=$formname>";
echo "<SELECT NAME=popup onChange=\"window.location=document.$formname.popup.options[document.$formname.popup.selectedIndex].value\">\n";

0 comments on commit 618b22c

Please sign in to comment.