Use XmlSelect in SpecialListusers
authorGeoffrey Mon <geofbot@gmail.com>
Sat, 1 Aug 2015 21:15:58 +0000 (21:15 +0000)
committerGeoffrey Mon <geofbot@gmail.com>
Sat, 1 Aug 2015 21:17:13 +0000 (21:17 +0000)
Bug: T93234
Change-Id: I25cdd8f7eb1bbfd893d201f6c68f5ccfabe70bf3

includes/specials/SpecialListusers.php

index 56c4eb5..9e7dc00 100644 (file)
@@ -285,13 +285,14 @@ class UsersPager extends AlphabeticPager {
                        ) . ' ';
 
                # Group drop-down list
-               $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ' .
-                       Xml::openElement( 'select', array( 'name' => 'group', 'id' => 'group' ) ) .
-                       Xml::option( $this->msg( 'group-all' )->text(), '' );
+               $sel = new XmlSelect( 'group', 'group', $this->requestedGroup );
+               $sel->addOption( $this->msg( 'group-all' )->text(), '' );
                foreach ( $this->getAllGroups() as $group => $groupText ) {
-                       $out .= Xml::option( $groupText, $group, $group == $this->requestedGroup );
+                       $sel->addOption( $groupText, $group );
                }
-               $out .= Xml::closeElement( 'select' ) . '<br />';
+
+               $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' ';
+               $out .= $sel->getHTML() . '<br />';
                $out .= Xml::checkLabel(
                        $this->msg( 'listusers-editsonly' )->text(),
                        'editsOnly',