Fixes Bug 18704 - Add an unique CSS class or ID to the tagfilter table row at RecentC...
authorMark A. Hershberger <mah@users.mediawiki.org>
Fri, 10 Feb 2012 19:29:28 +0000 (19:29 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Fri, 10 Feb 2012 19:29:28 +0000 (19:29 +0000)
Patch from Jarry1250

CREDITS
includes/ChangeTags.php
includes/specials/SpecialRecentchanges.php

diff --git a/CREDITS b/CREDITS
index 3c6b57d..1f40ddd 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -113,6 +113,7 @@ following names for their contribution to the product.
 * Harry Burt
 * Ireas
 * Jaska Zedlik
+* Jarry1250
 * Jeremy Baron
 * Jidanni
 * Jimmy Xu
index 63d3732..562aac3 100644 (file)
@@ -209,8 +209,8 @@ class ChangeTags {
                if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) )
                        return $fullForm ? '' : array();
 
-               $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMsgExt( 'tag-filter', 'parseinline' ) ),
-                       Xml::input( 'tagfilter', 20, $selected ) );
+               $data = array( Html::rawElement( 'label', array( 'for' => 'tagfilter' ), wfMsgExt( 'tag-filter', 'parseinline' ),
+                               Xml::input( 'tagfilter', 20, $selected, array( 'class' => 'tagfilter-input' ) ) ) );
 
                if ( !$fullForm ) {
                        return $data;
@@ -220,6 +220,7 @@ class ChangeTags {
                $html .= "\n" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'tag-filter-submit' ) ) );
                $html .= "\n" . Html::hidden( 'title', $title->getPrefixedText() );
                $html = Xml::tags( 'form', array( 'action' => $title->getLocalURL(), 'method' => 'get' ), $html );
+               $html = Xml::tags( 'form', array( 'action' => $title->getLocalURL(), 'class' => 'tagfilter-form', 'method' => 'get' ), $html );
 
                return $html;
        }
index f8828ea..22bdd36 100644 (file)
@@ -568,14 +568,14 @@ class SpecialRecentChanges extends IncludableSpecialPage {
                $submit = ' ' . Xml::submitbutton( wfMsg( 'allpagessubmit' ) );
 
                $out = Xml::openElement( 'table', array( 'class' => 'mw-recentchanges-table' ) );
-               foreach( $extraOpts as $optionRow ) {
+               foreach( $extraOpts as $name=>$optionRow ) {
                        # Add submit button to the last row only
                        ++$count;
-                       $addSubmit = $count === $extraOptsCount ? $submit : '';
+                       $addSubmit = ( $count === $extraOptsCount ) ? $submit : '';
 
                        $out .= Xml::openElement( 'tr' );
                        if( is_array( $optionRow ) ) {
-                               $out .= Xml::tags( 'td', array( 'class' => 'mw-label' ), $optionRow[0] );
+                               $out .= Xml::tags( 'td', array( 'class' => 'mw-label ' . $name . '-label' ), $optionRow[0] );
                                $out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
                        } else {
                                $out .= Xml::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );