From: Raimond Spekking Date: Wed, 8 Sep 2010 11:21:08 +0000 (+0000) Subject: Add a CSS class to the input form X-Git-Tag: 1.31.0-rc.0~35096 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=a1df2744eb0c6ec77a8404b39f362e031ba4c19f;p=lhc%2Fweb%2Fwiklou.git Add a CSS class to the input form And while I am at it: Use more nice Xml/Html functions --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index f02f44f3b7..c6cb9734c7 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -331,7 +331,7 @@ class SpecialContributions extends SpecialPage { $this->opts['topOnly'] = false; } - $f = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); + $f = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'class' => 'mw-contributions-form' ) ); # Add hidden params for tracking except for parameters in $skipParameters $skipParameters = array( 'namespace', 'deletedOnly', 'target', 'contribs', 'year', 'month', 'topOnly' ); @@ -344,8 +344,7 @@ class SpecialContributions extends SpecialPage { $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagFilter'] ); - $f .= '
' . - Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) . + $f .= Xml::fieldset( wfMsg( 'sp-contributions-search' ) ) . Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parsemag' ) ), 'contribs', 'newbie' , 'newbie', $this->opts['contribs'] == 'newbie' ? true : false ) . '
' . Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ), @@ -354,27 +353,24 @@ class SpecialContributions extends SpecialPage { 'size' => '20', 'required' => '' ) + ( $this->opts['target'] ? array() : array( 'autofocus' ) ) ) . ' '. - '' . - Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . - Xml::namespaceSelector( $this->opts['namespace'], '' ) . - '' . + Html::rawElement( 'span', array( 'style' => 'white-space: nowrap' ), + Xml::label( wfMsg( 'namespace' ), 'namespace' ) . ' ' . + Xml::namespaceSelector( $this->opts['namespace'], '' ) + ) . Xml::checkLabel( wfMsg( 'history-show-deleted' ), 'deletedOnly', 'mw-show-deleted-only', $this->opts['deletedOnly'] ) . '
' . Xml::tags( 'p', null, Xml::checkLabel( wfMsg( 'sp-contributions-toponly' ), 'topOnly', 'mw-show-top-only', $this->opts['topOnly'] ) ) . ( $tagFilter ? Xml::tags( 'p', null, implode( ' ', $tagFilter ) ) : '' ) . - Xml::openElement( 'p' ) . - '' . - Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . - '' . ' ' . - Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) . - Xml::closeElement( 'p' ); - + Html::rawElement( 'p', array( 'style' => 'white-space: nowrap' ), + Xml::dateMenu( $this->opts['year'], $this->opts['month'] ) . ' ' . + Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) + ) . ' '; $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' ); - if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) + if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) { $f .= "

{$explain}

"; - - $f .= '
' . + } + $f .= Xml::closeElement('fieldset' ) . Xml::closeElement( 'form' ); return $f; }