dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Use mw.util.getUrl( null ) to get the default mw.config.get( 'wgPageName' )"
[lhc/web/wiklou.git]
/
includes
/
htmlform
/
OOUIHTMLForm.php
diff --git
a/includes/htmlform/OOUIHTMLForm.php
b/includes/htmlform/OOUIHTMLForm.php
index
e21d783
..
baafa5e
100644
(file)
--- a/
includes/htmlform/OOUIHTMLForm.php
+++ b/
includes/htmlform/OOUIHTMLForm.php
@@
-281,8
+281,17
@@
class OOUIHTMLForm extends HTMLForm {
public function wrapForm( $html ) {
if ( is_string( $this->mWrapperLegend ) ) {
public function wrapForm( $html ) {
if ( is_string( $this->mWrapperLegend ) ) {
+ $classes = $this->mCollapsible ? [ 'mw-collapsible' ] : [];
+ if ( $this->mCollapsed ) {
+ $classes[] = 'mw-collapsed';
+ }
$content = new OOUI\FieldsetLayout( [
'label' => $this->mWrapperLegend,
$content = new OOUI\FieldsetLayout( [
'label' => $this->mWrapperLegend,
+ 'classes' => $classes,
+ 'group' => new OOUI\StackLayout( [
+ 'expanded' => false,
+ 'classes' => [ 'mw-collapsible-content' ],
+ ] ),
'items' => [
new OOUI\Widget( [
'content' => new OOUI\HtmlSnippet( $html )
'items' => [
new OOUI\Widget( [
'content' => new OOUI\HtmlSnippet( $html )
@@
-293,8
+302,9
@@
class OOUIHTMLForm extends HTMLForm {
$content = new OOUI\HtmlSnippet( $html );
}
$content = new OOUI\HtmlSnippet( $html );
}
+ $classes = [ 'mw-htmlform', 'mw-htmlform-ooui' ];
$form = new OOUI\FormLayout( $this->getFormAttributes() + [
$form = new OOUI\FormLayout( $this->getFormAttributes() + [
- 'classes' =>
[ 'mw-htmlform', 'mw-htmlform-ooui' ]
,
+ 'classes' =>
$classes
,
'content' => $content,
] );
'content' => $content,
] );