X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=blobdiff_plain;f=includes%2Fhtmlform%2FOOUIHTMLForm.php;h=94ba75eb0fecbbdc7e2824fccb2ddcc50fad1f9f;hb=388bbf3f7baefea02f9c89c4ade958059fa4282d;hp=baafa5e7215467f152ef650b64b8b3a8ada12926;hpb=3b0ff76e9563039f45ad34b01b81576142e150c3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index baafa5e721..94ba75eb0f 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -281,17 +281,10 @@ class OOUIHTMLForm extends HTMLForm { public function wrapForm( $html ) { if ( is_string( $this->mWrapperLegend ) ) { - $classes = $this->mCollapsible ? [ 'mw-collapsible' ] : []; - if ( $this->mCollapsed ) { - $classes[] = 'mw-collapsed'; - } - $content = new OOUI\FieldsetLayout( [ + $phpClass = $this->mCollapsible ? CollapsibleFieldsetLayout::class : OOUI\FieldsetLayout::class; + $content = new $phpClass( [ 'label' => $this->mWrapperLegend, - 'classes' => $classes, - 'group' => new OOUI\StackLayout( [ - 'expanded' => false, - 'classes' => [ 'mw-collapsible-content' ], - ] ), + 'collapsed' => $this->mCollapsed, 'items' => [ new OOUI\Widget( [ 'content' => new OOUI\HtmlSnippet( $html )