[ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n";
}
+ /**
+ * @inheritDoc
+ * @return OOUI\PanelLayout
+ */
protected function wrapFieldSetSection( $legend, $section, $attributes, $isRoot ) {
// to get a user visible effect, wrap the fieldset into a framed panel layout
$layout = new OOUI\PanelLayout( [
public function wrapForm( $html ) {
if ( is_string( $this->mWrapperLegend ) ) {
- $content = new OOUI\FieldsetLayout( [
+ $phpClass = $this->mCollapsible ? CollapsibleFieldsetLayout::class : OOUI\FieldsetLayout::class;
+ $content = new $phpClass( [
'label' => $this->mWrapperLegend,
+ 'collapsed' => $this->mCollapsed,
'items' => [
new OOUI\Widget( [
'content' => new OOUI\HtmlSnippet( $html )
$content = new OOUI\HtmlSnippet( $html );
}
+ $classes = [ 'mw-htmlform', 'mw-htmlform-ooui' ];
$form = new OOUI\FormLayout( $this->getFormAttributes() + [
- 'classes' => [ 'mw-htmlform', 'mw-htmlform-ooui' ],
+ 'classes' => $classes,
'content' => $content,
] );