Legoktm has uploaded a new change for review. https://gerrit.wikimedia.org/r/222740
Change subject: Convert Special:RandomInCategory to use OOUI display format ...................................................................... Convert Special:RandomInCategory to use OOUI display format And set up autocompletion and validation for the Category input. Change-Id: I4c0b11e2ae0cfa906bbde77fc89901cf88a9a5bd --- M includes/specials/SpecialRandomInCategory.php 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/222740/1 diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index b5c9e19..e18c452 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -70,15 +70,14 @@ protected function getFormFields() { $this->addHelpLink( 'Help:RandomInCategory' ); - $form = array( + return array( 'category' => array( - 'type' => 'text', + 'type' => 'title', + 'namespace' => NS_CATEGORY, 'label-message' => 'randomincategory-category', 'required' => true, ) ); - - return $form; } public function requiresWrite() { @@ -89,6 +88,10 @@ return false; } + protected function getDisplayFormat() { + return 'ooui'; + } + protected function setParameter( $par ) { // if subpage present, fake form submission $this->onSubmit( array( 'category' => $par ) ); -- To view, visit https://gerrit.wikimedia.org/r/222740 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4c0b11e2ae0cfa906bbde77fc89901cf88a9a5bd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits