protected $mPre = '';
protected $mHeader = '';
protected $mFooter = '';
+ protected $mSectionHeaders = array();
+ protected $mSectionFooters = array();
protected $mPost = '';
protected $mId;
* Add header text, inside the form.
* @param $msg String complete text of message to display
*/
- function addHeaderText( $msg ) { $this->mHeader .= $msg; }
+ function addHeaderText( $msg, $section = null ) {
+ if ( is_null( $section ) ) {
+ $this->mHeader .= $msg;
+ } else {
+ if ( !isset( $this->mSectionHeaders[$section] ) ) {
+ $this->mSectionHeaders[$section] = '';
+ }
+ $this->mSectionHeaders[$section] .= $msg;
+ }
+ }
/**
* Add footer text, inside the form.
* @param $msg String complete text of message to display
*/
- function addFooterText( $msg ) { $this->mFooter .= $msg; }
+ function addFooterText( $msg, $section = null ) {
+ if ( is_null( $section ) ) {
+ $this->mFooter .= $msg;
+ } else {
+ if ( !isset( $this->mSectionFooters[$section] ) ) {
+ $this->mSectionFooters[$section] = '';
+ }
+ $this->mSectionFooters[$section] .= $msg;
+ }
+ }
/**
* Add text to the end of the display.
} elseif ( is_array( $value ) ) {
$section = $this->displaySection( $value, $key );
$legend = wfMsg( "{$this->mMessagePrefix}-$key" );
- $subsectionHtml .= Xml::fieldset( $legend, $section ) . "\n";
+ if ( isset( $this->mSectionHeaders[$key] ) ) {
+ $section = $this->mSectionHeaders[$key] . $section;
+ }
+ if ( isset( $this->mSectionFooters[$key] ) ) {
+ $section .= $this->mSectionFooters[$key];
+ }
+ $subsectionHtml .= Xml::fieldset( $legend, $section ) . "\n";
}
}