From a0a40504f39cebe6b91c05dcbdb68e9a57ba243a Mon Sep 17 00:00:00 2001 From: MatmaRex Date: Mon, 20 May 2013 11:07:25 +0200 Subject: [PATCH] Watchlist: Separate non-form parts out of the
These include the information blurb at the top and the "Mark all pages visited" button. This also allows us the change the form-inside-fieldset nesting to saner fieldset-inside-form. The 'mw-watchlist-form-namespaceselector' id was removed; the primary form now has id of 'mw-watchlist-form'. Bug: 48615 Change-Id: I9398922dc4cabc7b190f8d97c5d91a05710206bb --- includes/specials/SpecialWatchlist.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index b4bea60301..5d3dc2fa8f 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -245,12 +245,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 .= "

"; @@ -275,7 +271,16 @@ class SpecialWatchlist extends SpecialPage { $form .= Xml::closeElement( 'form' ) . "\n"; } - $form .= "


\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(); @@ -355,7 +360,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 .= "
\n

"; $form .= Html::namespaceSelector( array( @@ -386,8 +390,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 -- 2.20.1