X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2Fpagers%2FUsersPager.php;h=cdb9130bc0c608e3778bccfaefef2fc7e1bf0236;hp=7fa03bae341014974a326b9ca528ed178165dedb;hb=fb79f30319b9ad2a7eb0f5f4d1668143ec8f963e;hpb=f4a53c54065c385172363416eb3cb44b67585ca2 diff --git a/includes/specials/pagers/UsersPager.php b/includes/specials/pagers/UsersPager.php index 7fa03bae34..cdb9130bc0 100644 --- a/includes/specials/pagers/UsersPager.php +++ b/includes/specials/pagers/UsersPager.php @@ -275,44 +275,45 @@ class UsersPager extends AlphabeticPager { $groupOptions[ $groupText ] = $group; } - $optionsDefault = []; - if ( $this->editsOnly ) { - $optionsDefault[] = 'editsOnly'; - } - if ( $this->creationSort ) { - $optionsDefault[] = 'creationSort'; - } - if ( $this->mDefaultDirection ) { - $optionsDefault[] = 'desc'; - } - $formDescriptor = [ 'user' => [ 'class' => 'HTMLUserTextField', 'label' => $this->msg( 'listusersfrom' )->text(), 'name' => 'username', - 'value' => $this->requestedUser, + 'default' => $this->requestedUser, ], 'dropdown' => [ - 'label' => $this->msg( 'group' ), + 'label' => $this->msg( 'group' )->text(), 'name' => 'group', - 'value' => $this->requestedGroup, + 'default' => $this->requestedGroup, 'class' => 'HTMLSelectField', 'options' => $groupOptions, ], - 'options' => [ - 'class' => 'HTMLMultiSelectField', - 'options' => [ - $this->msg( 'listusers-editsonly' )->text() => 'editsOnly', - $this->msg( 'listusers-creationsort' )->text() => 'creationSort', - $this->msg( 'listusers-desc' )->text() => 'desc' - ], - 'default' => $optionsDefault + 'editsOnly' => [ + 'type' => 'check', + 'label' => $this->msg( 'listusers-editsonly' )->text(), + 'name' => 'editsOnly', + 'id' => 'editsOnly', + 'default' => $this->editsOnly + ], + 'creationSort' => [ + 'type' => 'check', + 'label' => $this->msg( 'listusers-creationsort' )->text(), + 'name' => 'creationSort', + 'id' => 'creationSort', + 'default' => $this->creationSort + ], + 'desc' => [ + 'type' => 'check', + 'label' => $this->msg( 'listusers-desc' )->text(), + 'name' => 'desc', + 'id' => 'desc', + 'default' => $this->mDefaultDirection ], 'limithiddenfield' => [ 'class' => 'HTMLHiddenField', 'name' => 'limit', - 'value' => $this->mLimit + 'default' => $this->mLimit ] ]; @@ -346,6 +347,7 @@ class UsersPager extends AlphabeticPager { $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() ); $htmlForm ->setMethod( 'get' ) + ->setAction( Title::newFromText( $self )->getLocalURL() ) ->setId( 'mw-listusers-form' ) ->setFormIdentifier( 'mw-listusers-form' ) ->suppressDefaultSubmit()