X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fwidget%2FComplexTitleInputWidget.php;h=a9e80425e5f725cc993e040afa256e20b298c3fa;hb=7babd362babcbf7f20adb8e12edb4f4bc1d4249f;hp=ea0ef9e293cad2efea272f992c818cc8926d9df0;hpb=48721b1eb24a1f5a309848e070e26ff8a71593a8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/widget/ComplexTitleInputWidget.php b/includes/widget/ComplexTitleInputWidget.php index ea0ef9e293..ca6c8484d1 100644 --- a/includes/widget/ComplexTitleInputWidget.php +++ b/includes/widget/ComplexTitleInputWidget.php @@ -1,14 +1,12 @@ array(), - 'title' => array(), - ), + [ + 'namespace' => [], + 'title' => [], + ], $config ); - // Parent constructor parent::__construct( $config ); // Properties @@ -41,20 +38,17 @@ class ComplexTitleInputWidget extends \OOUI\Widget { $this->namespace = new NamespaceInputWidget( $config['namespace'] ); $this->title = new TitleInputWidget( array_merge( $config['title'], - array( - // The inner TitleInputWidget shouldn't be infusable, - // only the ComplexTitleInputWidget itself can be. - 'infusable' => false, + [ 'relative' => true, 'namespace' => isset( $config['namespace']['value'] ) ? $config['namespace']['value'] : null, - ) + ] ) ); // Initialization $this - ->addClasses( array( 'mw-widget-complexTitleInputWidget' ) ) + ->addClasses( [ 'mw-widget-complexTitleInputWidget' ] ) ->appendContent( $this->namespace, $this->title ); } @@ -64,7 +58,9 @@ class ComplexTitleInputWidget extends \OOUI\Widget { public function getConfig( &$config ) { $config['namespace'] = $this->config['namespace']; + $config['namespace']['dropdown']['$overlay'] = true; $config['title'] = $this->config['title']; + $config['title']['$overlay'] = true; return parent::getConfig( $config ); } }