X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialRandomInCategory.php;h=7cf6b0a1b8999ae6c67e34b35fd9a3cd21ffa3b4;hb=440d21b0d9eed439507d1389a625a354d79cb17f;hp=e21eaebbfe346295f730617609186ad0126b6573;hpb=d0462ea3a2658d3cb0541251a4813fb0476e5748;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialRandomInCategory.php b/includes/specials/SpecialRandomInCategory.php index e21eaebbfe..7cf6b0a1b8 100644 --- a/includes/specials/SpecialRandomInCategory.php +++ b/includes/specials/SpecialRandomInCategory.php @@ -70,15 +70,15 @@ class SpecialRandomInCategory extends FormSpecialPage { protected function getFormFields() { $this->addHelpLink( 'Help:RandomInCategory' ); - $form = array( + return array( 'category' => array( - 'type' => 'text', + 'type' => 'title', + 'namespace' => NS_CATEGORY, + 'relative' => true, 'label-message' => 'randomincategory-category', 'required' => true, ) ); - - return $form; } public function requiresWrite() { @@ -89,6 +89,10 @@ class SpecialRandomInCategory extends FormSpecialPage { return false; } + protected function getDisplayFormat() { + return 'ooui'; + } + protected function alterForm( HTMLForm $form ) { $form->setSubmitTextMsg( 'randomincategory-submit' ); }