diff options
author | Leo Koppelkamm <diebuche@users.mediawiki.org> | 2011-07-08 21:12:10 +0000 |
---|---|---|
committer | Leo Koppelkamm <diebuche@users.mediawiki.org> | 2011-07-08 21:12:10 +0000 |
commit | 42d5c3f64d8a6266c116e0dddb8584b90bb09c2f (patch) | |
tree | b335a33d9f909806bf8d8f0523e40bcab519cb11 /includes/HTMLForm.php | |
parent | 52102598e2ee5767137650f63f57fa6c7ad072bc (diff) | |
download | mediawikicore-42d5c3f64d8a6266c116e0dddb8584b90bb09c2f.tar.gz mediawikicore-42d5c3f64d8a6266c116e0dddb8584b90bb09c2f.zip |
HTMLForm: Add option to output a title for a fieldset & activate it for Special:Pref. Preliminary work for Bug 29672
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91757
Diffstat (limited to 'includes/HTMLForm.php')
-rw-r--r-- | includes/HTMLForm.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index f560590635ec..c73d536185b8 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -676,7 +676,7 @@ class HTMLForm { * TODO: Document * @param $fields */ - function displaySection( $fields, $sectionName = '' ) { + function displaySection( $fields, $sectionName = '', $displayTitle = false ) { $tableHtml = ''; $subsectionHtml = ''; $hasLeftColumn = false; @@ -699,7 +699,11 @@ class HTMLForm { if ( isset( $this->mSectionFooters[$key] ) ) { $section .= $this->mSectionFooters[$key]; } - $subsectionHtml .= Xml::fieldset( $legend, $section ) . "\n"; + $attributes = array(); + if ( $displayTitle ) { + $attributes["title"] = $key; + } + $subsectionHtml .= Xml::fieldset( $legend, $section, $attributes ) . "\n"; } } |