Merge "Standardise preview warning box when using ?action=edit"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 17 Sep 2019 02:06:54 +0000 (02:06 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 17 Sep 2019 02:06:54 +0000 (02:06 +0000)
1  2 
includes/EditPage.php

diff --combined includes/EditPage.php
@@@ -25,7 -25,7 +25,7 @@@ use MediaWiki\EditPage\TextboxBuilder
  use MediaWiki\EditPage\TextConflictHelper;
  use MediaWiki\Logger\LoggerFactory;
  use MediaWiki\MediaWikiServices;
 -use MediaWiki\Storage\RevisionRecord;
 +use MediaWiki\Revision\RevisionRecord;
  use Wikimedia\ScopedCallback;
  
  /**
@@@ -2742,7 -2742,7 +2742,7 @@@ ERROR
         * content.
         *
         * @param Content|null|bool|string $content
 -       * @return string The editable text form of the content.
 +       * @return string|false|null The editable text form of the content.
         *
         * @throws MWException If $content is not an instance of TextContent and
         *   $this->allowNonTextContent is not true.
  
                if ( $this->isConflict ) {
                        $conflict = Html::rawElement(
-                               'h2', [ 'id' => 'mw-previewconflict' ],
+                               'div', [ 'id' => 'mw-previewconflict', 'class' => 'warningbox' ],
                                $this->context->msg( 'previewconflict' )->escaped()
                        );
                } else {
-                       $conflict = '<hr />';
+                       $conflict = '';
                }
  
                $previewhead = Html::rawElement(
                                'h2', [ 'id' => 'mw-previewheader' ],
                                $this->context->msg( 'preview' )->escaped()
                        ) .
-                       $out->parseAsInterface( $note ) . $conflict
+                       Html::rawElement( 'div', [ 'class' => 'warningbox' ],
+                               $out->parseAsInterface( $note )
+                       ) . $conflict
                );
  
                $pageViewLang = $this->mTitle->getPageViewLanguage();