Merge "Don't use p class="success" for success messages"

This commit is contained in:
jenkins-bot 2021-06-04 08:59:58 +00:00 committed by Gerrit Code Review
commit 997e665530
3 changed files with 11 additions and 10 deletions

View file

@ -2,6 +2,7 @@
namespace MediaWiki\Extension\AbuseFilter\Special;
use Html;
use MediaWiki\Extension\AbuseFilter\AbuseFilterPermissionManager;
use MediaWiki\Extension\AbuseFilter\CentralDBManager;
use MediaWiki\Extension\AbuseFilter\Consequences\ConsequencesFactory;
@ -147,14 +148,14 @@ class SpecialAbuseFilter extends AbuseFilterSpecialPage {
$out->setSubtitle( $this->msg( 'abusefilter-edit-done-subtitle' ) );
$changedFilter = intval( $request->getVal( 'changedfilter' ) );
$changeId = intval( $request->getVal( 'changeid' ) );
$out->wrapWikiMsg( '<p class="success">$1</p>',
[
$out->addHTML( Html::successBox(
$this->msg(
'abusefilter-edit-done',
$changedFilter,
$changeId,
$this->getLanguage()->formatNum( $changedFilter )
]
);
)->parse()
) );
}
[ $view, $pageType, $params ] = $this->getViewClassAndPageType( $subpage );

View file

@ -2,6 +2,7 @@
namespace MediaWiki\Extension\AbuseFilter\View;
use Html;
use HTMLForm;
use IContextSource;
use Linker;
@ -367,14 +368,13 @@ class AbuseFilterViewRevert extends AbuseFilterView {
$this->revertAction( $action, $result );
}
}
$this->getOutput()->wrapWikiMsg(
'<p class="success">$1</p>',
[
$this->getOutput()->addHTML( Html::successBox(
$this->msg(
'abusefilter-revert-success',
$filter,
$this->getLanguage()->formatNum( $filter )
]
);
)->parse()
) );
return true;
}

View file

@ -6,7 +6,7 @@ class ViewListPage extends Page {
get title() { return $( '#firstHeading' ); }
get newFilterButton() { return $( '.oo-ui-buttonElement a' ); }
get filterSavedNotice() { return $( '.success' ); }
get filterSavedNotice() { return $( '.successbox' ); }
get savedFilterID() {
const succesMsg = this.filterSavedNotice.getHTML(),