summaryrefslogtreecommitdiff
path: root/includes/specialpage/FormSpecialPage.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specialpage/FormSpecialPage.php')
-rw-r--r--includes/specialpage/FormSpecialPage.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/specialpage/FormSpecialPage.php b/includes/specialpage/FormSpecialPage.php
index 90567617..42c59806 100644
--- a/includes/specialpage/FormSpecialPage.php
+++ b/includes/specialpage/FormSpecialPage.php
@@ -96,7 +96,11 @@ abstract class FormSpecialPage extends SpecialPage {
$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() ) {