X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecialpage%2FFormSpecialPage.php;h=d22875b9bdb6fdaea08561d84f2bc37faa361db0;hb=e53c515578be49fd950c7ced2728b12447c0e8ef;hp=21e465a62ee28738ad221d5b7869ef4841d6fb08;hpb=4f1067e27efe648e6089ab0b28fac1b2c3481816;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specialpage/FormSpecialPage.php b/includes/specialpage/FormSpecialPage.php index 21e465a62e..d22875b9bd 100644 --- a/includes/specialpage/FormSpecialPage.php +++ b/includes/specialpage/FormSpecialPage.php @@ -89,16 +89,18 @@ abstract class FormSpecialPage extends SpecialPage { * @return HTMLForm|null */ protected function getForm() { - $this->fields = $this->getFormFields(); - $form = HTMLForm::factory( $this->getDisplayFormat(), - $this->fields, + $this->getFormFields(), $this->getContext(), $this->getMessagePrefix() ); $form->setSubmitCallback( array( $this, 'onSubmit' ) ); - $form->setWrapperLegendMsg( $this->getMessagePrefix() . '-legend' ); + if ( $this->getDisplayFormat() !== 'ooui' ) { + // No legend and wrapper by default in OOUI forms, but can be set manually + // from alterForm() + $form->setWrapperLegendMsg( $this->getMessagePrefix() . '-legend' ); + } $headerMsg = $this->msg( $this->getMessagePrefix() . '-text' ); if ( !$headerMsg->isDisabled() ) { @@ -167,7 +169,6 @@ abstract class FormSpecialPage extends SpecialPage { * Failures here must throw subclasses of ErrorPageError. * @param User $user * @throws UserBlockedError - * @return bool True */ protected function checkExecutePermissions( User $user ) { $this->checkPermissions(); @@ -180,8 +181,6 @@ abstract class FormSpecialPage extends SpecialPage { if ( $this->requiresWrite() ) { $this->checkReadOnly(); } - - return true; } /**