X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialListusers.php;h=d43a263f7e71ad60cc2b7112ca64ee72b17384f7;hb=23299ca8790bcf1aebcf54e0932b94338e630474;hp=56c4eb506f392c67cd057e530b34245a1fe636e6;hpb=b9e0a89536c0ba9332dbf9aaf015b3aaaf1d41a8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialListusers.php b/includes/specials/SpecialListusers.php index 56c4eb506f..d43a263f7e 100644 --- a/includes/specials/SpecialListusers.php +++ b/includes/specials/SpecialListusers.php @@ -163,7 +163,7 @@ class UsersPager extends AlphabeticPager { * @return string */ function formatRow( $row ) { - if ( $row->user_id == 0 ) { #Bug 16487 + if ( $row->user_id == 0 ) { # Bug 16487 return ''; } @@ -263,6 +263,8 @@ class UsersPager extends AlphabeticPager { function getPageHeader() { list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() ); + $this->getOutput()->addModules( 'mediawiki.userSuggest' ); + # Form tag $out = Xml::openElement( 'form', @@ -271,13 +273,14 @@ class UsersPager extends AlphabeticPager { Xml::fieldset( $this->msg( 'listusers' )->text() ) . Html::hidden( 'title', $self ); - # Username field + # Username field (with autocompletion support) $out .= Xml::label( $this->msg( 'listusersfrom' )->text(), 'offset' ) . ' ' . Html::input( 'username', $this->requestedUser, 'text', array( + 'class' => 'mw-autocomplete-user', 'id' => 'offset', 'size' => 20, 'autofocus' => $this->requestedUser === '' @@ -285,13 +288,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' ) . '
'; + + $out .= Xml::label( $this->msg( 'group' )->text(), 'group' ) . ' '; + $out .= $sel->getHTML() . '
'; $out .= Xml::checkLabel( $this->msg( 'listusers-editsonly' )->text(), 'editsOnly', @@ -318,7 +322,7 @@ class UsersPager extends AlphabeticPager { # Submit button and form bottom $out .= Html::hidden( 'limit', $this->mLimit ); - $out .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ); + $out .= Xml::submitButton( $this->msg( 'listusers-submit' )->text() ); Hooks::run( 'SpecialListusersHeader', array( $this, &$out ) ); $out .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );