From 618b22c57c9f5f5c82bb362a8d39602870c2d14e Mon Sep 17 00:00:00 2001 From: martin Date: Mon, 12 Aug 2002 07:40:53 +0000 Subject: [PATCH] Language changes to weblib --- lang/en/moodle.php | 1 + lib/weblib.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lang/en/moodle.php b/lang/en/moodle.php index fed8ed69f5..9929c43ef8 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -25,6 +25,7 @@ $string[category] = "Category"; $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"; diff --git a/lib/weblib.php b/lib/weblib.php index 7052741908..b8674f7a1b 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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,7 +177,7 @@ function choose_from_menu ($options, $name, $selected="", $nothing="Choose...", echo "\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 @@ -181,6 +185,10 @@ function popup_form ($common, $options, $formname, $selected="", $nothing="Choos // $selected = the option that is already selected // $nothing = The label for the "no choice" option + if ($nothing == "choose") { + $nothing = get_string("choose")."..."; + } + echo "
"; echo "