r49495 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49494‎ | r49495 | r49496 >
Date:06:48, 15 April 2009
Author:werdna
Status:deferred
Tags:
Comment:
Add help text support to HTMLForm, will copy styles over later.
Modified paths:
  • /branches/preferences-work/phase3/includes/HTMLForm.php (modified) (history)

Diff [purge]

Index: branches/preferences-work/phase3/includes/HTMLForm.php
@@ -401,6 +401,22 @@
402402
403403 $html = Xml::tags( 'tr', array( 'class' => "mw-htmlform-field-$fieldType" ),
404404 $html ) . "\n";
 405+
 406+ // Help text
 407+ if ( isset($this->mParams['help-message']) ) {
 408+ $msg = $this->mParams['help-message'];
 409+
 410+ $text = wfMsgExt( $msg, 'parseinline' );
 411+
 412+ if (!wfEmptyMsg( $msg, $text ) ) {
 413+ $row = Xml::tags( 'td', array( 'colspan' => 2, 'class' => 'htmlform-tip' ),
 414+ $text );
 415+
 416+ $row = Xml::tags( 'tr', null, $row );
 417+
 418+ $html .= "$row\n";
 419+ }
 420+ }
405421
406422 return $html;
407423 }

Status & tagging log