Merge "Watchlist: Separate non-form parts out of the <fieldset>"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 26 Jul 2013 16:36:29 +0000 (16:36 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 26 Jul 2013 16:36:29 +0000 (16:36 +0000)
includes/specials/SpecialWatchlist.php

index b322547..9ef02fa 100644 (file)
@@ -239,12 +239,8 @@ class SpecialWatchlist extends SpecialPage {
                        $output->showLagWarning( $lag );
                }
 
-               # Create output form
-               $form = Xml::fieldset(
-                       $this->msg( 'watchlist-options' )->text(),
-                       false,
-                       array( 'id' => 'mw-watchlist-options' )
-               );
+               # Create output
+               $form = '';
 
                # Show watchlist header
                $form .= "<p>";
@@ -269,7 +265,16 @@ class SpecialWatchlist extends SpecialPage {
                        $form .= Xml::closeElement( 'form' ) . "\n";
                }
 
-               $form .= "<hr />\n";
+               $form .= Xml::openElement( 'form', array(
+                       'method' => 'post',
+                       'action' => $this->getTitle()->getLocalURL(),
+                       'id' => 'mw-watchlist-form'
+               ) );
+               $form .= Xml::fieldset(
+                       $this->msg( 'watchlist-options' )->text(),
+                       false,
+                       array( 'id' => 'mw-watchlist-options' )
+               );
 
                $tables = array( 'recentchanges', 'watchlist' );
                $fields = RecentChange::selectFields();
@@ -349,7 +354,6 @@ class SpecialWatchlist extends SpecialPage {
                $form .= $wlInfo;
                $form .= $cutofflinks;
                $form .= $lang->pipeList( $links ) . "\n";
-               $form .= Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'id' => 'mw-watchlist-form-namespaceselector' ) ) . "\n";
                $form .= "<hr />\n<p>";
                $form .= Html::namespaceSelector(
                        array(
@@ -380,8 +384,8 @@ class SpecialWatchlist extends SpecialPage {
                foreach ( $hiddenFields as $key => $value ) {
                        $form .= Html::hidden( $key, $value ) . "\n";
                }
-               $form .= Xml::closeElement( 'form' ) . "\n";
                $form .= Xml::closeElement( 'fieldset' ) . "\n";
+               $form .= Xml::closeElement( 'form' ) . "\n";
                $output->addHTML( $form );
 
                # If there's nothing to show, stop here