If editing without JS, and clicking preview on action=edit
you will see a preview with a note at the top of the page.
McrUndoAction.php uses a close copy of the same code and will
be amended accordingly.
Currently this is using a class `.previewnote` and not the
standardised and semantic "warningbox".
The messages of the preview will now be warningbox's
- see screenshots for end result:
* https://phabricator.wikimedia.org/
F30284946
* https://phabricator.wikimedia.org/
F30284947
Bug: T232414
Change-Id: Ib678f03e908fa9dcd5af7632941475203478abf7
if ( $this->isConflict ) {
$conflict = Html::rawElement(
if ( $this->isConflict ) {
$conflict = Html::rawElement(
- 'h2', [ 'id' => 'mw-previewconflict' ],
+ 'div', [ 'id' => 'mw-previewconflict', 'class' => 'warningbox' ],
$this->context->msg( 'previewconflict' )->escaped()
);
} else {
$this->context->msg( 'previewconflict' )->escaped()
);
} else {
}
$previewhead = Html::rawElement(
}
$previewhead = Html::rawElement(
'h2', [ 'id' => 'mw-previewheader' ],
$this->context->msg( 'preview' )->escaped()
) .
'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();
);
$pageViewLang = $this->mTitle->getPageViewLanguage();
'h2', [ 'id' => 'mw-previewheader' ],
$this->context->msg( 'preview' )->text()
) .
'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();
);
$pageViewLang = $this->getTitle()->getPageViewLanguage();
/* Note on preview page */
.previewnote {
/* Note on preview page */
.previewnote {
-.previewnote p {
- text-indent: 3em;
- margin: 0.8em 0;
-}
-
.visualClear {
clear: both;
}
.visualClear {
clear: both;
}