diff --git a/lib/weblib.php b/lib/weblib.php
index bacfd8cd1df..09d37161469 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -1168,11 +1168,14 @@ function print_textfield ($name, $value, $alt = '',$size=50,$maxlength=0, $retur
* @param string $targetwindow The name of the target page to open the linked page in.
* @param string $selectlabel Text to place in a [label] element - preferred for accessibility.
* @param array $optionsextra TODO, an array?
+ * @param mixed $gobutton If set, this turns off the JavaScript and uses a 'go'
+ * button instead (as is always included for JS-disabled users). Set to true
+ * for a literal 'Go' button, or to a string to change the name of the button.
* @return string If $return is true then the entire form is returned as a string.
* @todo Finish documenting this function
*/
function popup_form($common, $options, $formid, $selected='', $nothing='choose', $help='', $helptext='', $return=false,
-$targetwindow='self', $selectlabel='', $optionsextra=NULL) {
+$targetwindow='self', $selectlabel='', $optionsextra=NULL, $gobutton=NULL) {
global $CFG;
static $go, $choose; /// Locally cached, in case there's lots on a page
@@ -1209,17 +1212,24 @@ $targetwindow='self', $selectlabel='', $optionsextra=NULL) {
$selectlabel = '';
}
- //IE and Opera fire the onchange when ever you move into a dropdwown list with the keyboard.
- //onfocus will call a function inside dropdown.js. It fixes this IE/Opera behavior.
- //Note: There is a bug on Opera+Linux with the javascript code (first mouse selection is inactive),
- //so we do not fix the Opera behavior on Linux
- if (check_browser_version('MSIE') || (check_browser_version('Opera') && !check_browser_operating_system("Linux"))) {
- $output .= '