Matmarex has uploaded a new change for review.
https://gerrit.wikimedia.org/r/64557
Change subject: Clean up the watchlist reset button HTML
......................................................................
Clean up the watchlist reset button HTML
It had its own separate form; now it's just another button in the main
options form, with a non-dummy 'name' to distinguish clicks on it.
No backend code had to be changed.
This also allows us the change the form-inside-fieldset nesting to
saner fieldset-inside-form.
Id changes:
* id 'mw-watchlist-resetbutton' was kept, but moved to the button
itself from the form.
* id 'mw-watchlist-form-namespaceselector' is gone
* the primary (and only) form now has id of 'mw-watchlist-form'
Bug: 48615
Change-Id: I9398922dc4cabc7b190f8d97c5d91a05710206bb
---
M includes/specials/SpecialWatchlist.php
1 file changed, 11 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/57/64557/1
diff --git a/includes/specials/SpecialWatchlist.php
b/includes/specials/SpecialWatchlist.php
index f5e3660..4c7ea90 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -241,7 +241,12 @@
}
# Create output form
- $form = Xml::fieldset(
+ $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' )
@@ -259,15 +264,10 @@
$form .= "</p>";
if ( $wgShowUpdatedMarker ) {
- $form .= Xml::openElement( 'form', array( 'method' =>
'post',
- 'action' => $this->getTitle()->getLocalURL(),
- 'id' => 'mw-watchlist-resetbutton' ) ) . "\n" .
- Xml::submitButton( $this->msg( 'enotif_reset'
)->text(), array( 'name' => 'dummy' ) ) . "\n" .
- Html::hidden( 'reset', 'all' ) . "\n";
- foreach ( $nondefaults as $key => $value ) {
- $form .= Html::hidden( $key, $value ) . "\n";
- }
- $form .= Xml::closeElement( 'form' ) . "\n";
+ $form .= Xml::submitButton(
+ $this->msg( 'enotif_reset' )->text(),
+ array( 'name' => 'reset', 'id' =>
'mw-watchlist-resetbutton' )
+ );
}
$form .= "<hr />\n";
@@ -350,7 +350,6 @@
$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(
@@ -381,8 +380,8 @@
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
--
To view, visit https://gerrit.wikimedia.org/r/64557
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9398922dc4cabc7b190f8d97c5d91a05710206bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Matmarex <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits