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)
includes/EditPage.php
includes/actions/McrUndoAction.php
resources/src/mediawiki.legacy/shared.css

index 9d89785..d047f6e 100644 (file)
@@ -4045,11 +4045,11 @@ ERROR;
 
                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(
@@ -4058,7 +4058,9 @@ ERROR;
                                '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();
index 41cd24e..68c0ea1 100644 (file)
@@ -289,8 +289,9 @@ class McrUndoAction extends FormAction {
                                'h2', [ 'id' => 'mw-previewheader' ],
                                $this->context->msg( 'preview' )->text()
                        ) .
-                       $out->parseAsInterface( $note ) .
-                       "<hr />"
+                       Html::rawElement( 'div', [ 'class' => 'warningbox' ],
+                               $out->parseAsInterface( $note )
+                       )
                );
 
                $pageViewLang = $this->getTitle()->getPageViewLanguage();
index 2c88bdc..75dae92 100644 (file)
@@ -436,15 +436,9 @@ a.new {
 
 /* Note on preview page */
 .previewnote {
-       color: #d33;
        margin-bottom: 1em;
 }
 
-.previewnote p {
-       text-indent: 3em;
-       margin: 0.8em 0;
-}
-
 .visualClear {
        clear: both;
 }