protected $mButtons = [];
protected $mWrapperLegend = false;
+ protected $mWrapperAttributes = [];
/**
* Salt for the edit token.
public function tryAuthorizedSubmit() {
$result = false;
- $identOkay = false;
if ( $this->mFormIdentifier === null ) {
$identOkay = true;
} else {
# Include a <fieldset> wrapper for style, if requested.
if ( $this->mWrapperLegend !== false ) {
$legend = is_string( $this->mWrapperLegend ) ? $this->mWrapperLegend : false;
- $html = Xml::fieldset( $legend, $html );
+ $html = Xml::fieldset( $legend, $html, $this->mWrapperAttributes );
}
return Html::rawElement(
return $this;
}
+ /**
+ * For internal use only. Use is discouraged, and should only be used where
+ * support for gadgets/user scripts is warranted.
+ * @param array $attributes
+ * @internal
+ * @return HTMLForm $this for chaining calls
+ */
+ public function setWrapperAttributes( $attributes ) {
+ $this->mWrapperAttributes = $attributes;
+
+ return $this;
+ }
+
/**
* Prompt the whole form to be wrapped in a "<fieldset>", with
* this message as its "<legend>" element.