X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLFormElement.php;h=2830b9c258e265734c4c0595ffe43a49619f341a;hp=10db90cca2e6cf05425489cc5b14a80823d9e164;hb=ee56f00ddf0609082f8ae9a4dc3e6e1b6f54ddfd;hpb=d19826aa35b206847a568a4b2c1c9ffaa615fca5 diff --git a/includes/htmlform/HTMLFormElement.php b/includes/htmlform/HTMLFormElement.php index 10db90cca2..2830b9c258 100644 --- a/includes/htmlform/HTMLFormElement.php +++ b/includes/htmlform/HTMLFormElement.php @@ -1,7 +1,7 @@ addClasses( [ 'mw-htmlform-hide-if' ] ); } if ( $this->modules ) { - // JS code must be able to read this before infusing (before OOjs UI is even loaded), + // JS code must be able to read this before infusing (before OOUI is even loaded), // so we put this in a separate attribute (not with the rest of the config). // And it's not needed anymore after infusing, so we don't put it in JS config at all. $this->setAttributes( [ 'data-mw-modules' => implode( ',', $this->modules ) ] ); @@ -38,8 +38,8 @@ class HTMLFormFieldLayout extends OOUI\FieldLayout { use HTMLFormElement; public function __construct( $fieldWidget, array $config = [] ) { - // Parent constructor parent::__construct( $fieldWidget, $config ); + // Traits $this->initializeHTMLFormElement( $config ); } @@ -53,8 +53,8 @@ class HTMLFormActionFieldLayout extends OOUI\ActionFieldLayout { use HTMLFormElement; public function __construct( $fieldWidget, $buttonWidget = false, array $config = [] ) { - // Parent constructor parent::__construct( $fieldWidget, $buttonWidget, $config ); + // Traits $this->initializeHTMLFormElement( $config ); }