Merge "SpecialPagesWithProp: Use 'combobox' field and convert to OOUI"
[lhc/web/wiklou.git] / includes / specialpage / FormSpecialPage.php
index 9056761..d22875b 100644 (file)
@@ -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() ) {
@@ -165,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();
@@ -178,8 +181,6 @@ abstract class FormSpecialPage extends SpecialPage {
                if ( $this->requiresWrite() ) {
                        $this->checkReadOnly();
                }
-
-               return true;
        }
 
        /**