MDL-26925 User selector: Set label when no results
authorDan Poltawski <dan@moodle.com>
Thu, 6 Jun 2013 06:07:27 +0000 (14:07 +0800)
committerDan Poltawski <dan@moodle.com>
Thu, 6 Jun 2013 06:07:27 +0000 (14:07 +0800)
Thanks to Jonathon Fowler for the fix!

user/selector/module.js

index ca89434..0c5d997 100644 (file)
@@ -263,6 +263,7 @@ M.core_user.init_user_selector = function (Y, name, hash, extrafields, lastsearc
                     option.set('selected', true);
                 }
             } else {
+                optgroup.set('label', groupname);
                 optgroup.append(Y.Node.create('<option disabled="disabled">\u00A0</option>'));
             }
             this.listbox.append(optgroup);