Wrap fieldset in SpecialNewpages using HTMLForm
authorAmir Sarabadani <ladsgroup@gmail.com>
Sun, 17 Sep 2017 15:23:43 +0000 (19:23 +0400)
committerAmir Sarabadani <ladsgroup@gmail.com>
Sun, 17 Sep 2017 15:23:43 +0000 (19:23 +0400)
That's cleaner and fixes Ie119c92aa4936e2f8982163d4b00d08949f49264

Change-Id: I8721ae5db79d287a49c2ab8070f8838174a8d687

includes/specials/SpecialNewpages.php

index edfaa7c..671ab6f 100644 (file)
@@ -278,19 +278,14 @@ class SpecialNewpages extends IncludableSpecialPage {
                        }
                );
                $htmlForm->setMethod( 'get' );
-
-               $out->addHTML( Xml::fieldset( $this->msg( 'newpages' )->text() ) );
-
+               $htmlForm->setWrapperLegend( true );
+               $htmlForm->setWrapperLegendMsg( 'newpages' );
+               $htmlForm->addFooterText( Html::rawElement(
+                       'div',
+                       null,
+                       $this->filterLinks()
+               ) );
                $htmlForm->show();
-
-               $out->addHTML(
-                       Html::rawElement(
-                               'div',
-                               null,
-                               $this->filterLinks()
-                       ) .
-                       Xml::closeElement( 'fieldset' )
-               );
        }
 
        /**