Convert Special:ComparePages to OOUI
authorFlorian <florian.schmidt.stargatewissen@gmail.com>
Wed, 4 Nov 2015 18:14:57 +0000 (19:14 +0100)
committerReedy <reedy@wikimedia.org>
Sat, 2 Jan 2016 16:24:05 +0000 (16:24 +0000)
Bug: T117752
Change-Id: I480c2165c908ca7c8e08ed5990e386ddb515f3b0

includes/specials/SpecialComparePages.php

index 0f8b729..50a48c3 100644 (file)
@@ -51,11 +51,10 @@ class SpecialComparePages extends SpecialPage {
                $this->outputHeader();
 
                # Form (.mw-searchInput enables suggestions)
-               $form = new HTMLForm( array(
+               $form = HTMLForm::factory( 'ooui', array(
                        'Page1' => array(
-                               'type' => 'text',
+                               'type' => 'title',
                                'name' => 'page1',
-                               'cssclass' => 'mw-searchInput',
                                'label-message' => 'compare-page1',
                                'size' => '40',
                                'section' => 'page1',
@@ -70,9 +69,8 @@ class SpecialComparePages extends SpecialPage {
                                'validation-callback' => array( $this, 'checkExistingRevision' ),
                        ),
                        'Page2' => array(
-                               'type' => 'text',
+                               'type' => 'title',
                                'name' => 'page2',
-                               'cssclass' => 'mw-searchInput',
                                'label-message' => 'compare-page2',
                                'size' => '40',
                                'section' => 'page2',