From: Prateek Saxena Date: Sun, 23 Jul 2017 00:40:42 +0000 (+0530) Subject: UserPager: Use multiple checkboxes instead of multiselect X-Git-Tag: 1.31.0-rc.0~2624^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=eaefbf99c8183f543c766272fc1a73480d28e004;p=lhc%2Fweb%2Fwiklou.git UserPager: Use multiple checkboxes instead of multiselect The URL from the serialized form was something like: &wpoptions%5B%5D=editsOnly whereas we needed: &editsOnly=1 Bug: T171332 Change-Id: Iaec223195e121dab83b5605a3dfaffa8e1f93684 --- diff --git a/includes/specials/pagers/UsersPager.php b/includes/specials/pagers/UsersPager.php index 7fa03bae34..10baadfca6 100644 --- a/includes/specials/pagers/UsersPager.php +++ b/includes/specials/pagers/UsersPager.php @@ -275,17 +275,6 @@ 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', @@ -300,14 +289,26 @@ class UsersPager extends AlphabeticPager { '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', + 'value' => $this->editsOnly + ], + 'creationSort' => [ + 'type' => 'check', + 'label' => $this->msg( 'listusers-creationsort' )->text(), + 'name' => 'creationSort', + 'id' => 'creationSort', + 'value' => $this->creationSort + ], + 'desc' => [ + 'type' => 'check', + 'label' => $this->msg( 'listusers-desc' )->text(), + 'name' => 'desc', + 'id' => 'desc', + 'value' => $this->mDefaultDirection ], 'limithiddenfield' => [ 'class' => 'HTMLHiddenField',