tags: Use successbox/errorbox instead of bolded text on SpecialEditTags
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 16 Apr 2015 01:02:10 +0000 (02:02 +0100)
committerNikerabbit <niklas.laxstrom@gmail.com>
Tue, 21 Apr 2015 07:02:06 +0000 (07:02 +0000)
Follows-up 5c46810.

* Avoid style markup in i18n messages. Use successbox instead of
  <strong> inside a message in a span.
* Consistency with rest of MediaWiki (e.g. Special:Preferences).
* Make error look like an error. It was previously output in a plain
  paragraph with no styling or other indication.

Change-Id: I596cbdc2cf9c9968350c9e63621c0e3fb5bd8c6c

includes/specials/SpecialEditTags.php
languages/i18n/en.json

index 14850ff..bfd1717 100644 (file)
@@ -408,8 +408,6 @@ class SpecialEditTags extends UnlistedSpecialPage {
                        $tagsToRemove = array_diff( $existingTags, $tagList );
                }
 
-               //var_dump( array( 'add' => $tagsToAdd, 'remove' => $tagsToRemove ) );
-
                if ( !$tagsToAdd && !$tagsToRemove ) {
                        $status = Status::newFatal( 'tags-edit-none-selected' );
                } else {
@@ -431,7 +429,7 @@ class SpecialEditTags extends UnlistedSpecialPage {
         */
        protected function success() {
                $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) );
-               $this->getOutput()->wrapWikiMsg( "<span class=\"success\">\n$1\n</span>",
+               $this->getOutput()->wrapWikiMsg( "<div class=\"successbox\">\n$1\n</div>",
                        'tags-edit-success' );
                $this->wasSaved = true;
                $this->revList->reloadFromMaster();
@@ -445,7 +443,10 @@ class SpecialEditTags extends UnlistedSpecialPage {
         */
        protected function failure( $status ) {
                $this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) );
-               $this->getOutput()->addWikiText( $status->getWikiText( 'tags-edit-failure' ) );
+               $this->getOutput()->addWikiText( '<div class="errorbox">' .
+                       $status->getWikiText( 'tags-edit-failure' ) .
+                       '</div>'
+               );
                $this->showForm();
        }
 
index 93eb6c5..c9a2f95 100644 (file)
        "tags-edit-reason": "Reason:",
        "tags-edit-revision-submit": "Apply changes to {{PLURAL:$1|this revision|$1 revisions}}",
        "tags-edit-logentry-submit": "Apply changes to {{PLURAL:$1|this log entry|$1 log entries}}",
-       "tags-edit-success": "<strong>The changes were successfully applied.</strong>",
-       "tags-edit-failure": "<strong>The changes could not be applied:</strong>\n$1",
+       "tags-edit-success": "The changes were successfully applied.",
+       "tags-edit-failure": "The changes could not be applied:\n$1",
        "tags-edit-nooldid-title": "Invalid target revision",
        "tags-edit-nooldid-text": "You have either not specified any target revision on which to perform this function, or the specified revision does not exist.",
        "tags-edit-none-selected": "Please select at least one tag to add or remove.",