Add help text to "partial" and "sitewide" options on Special:Block
authorThalia <thalia.e.chan@googlemail.com>
Wed, 27 Feb 2019 22:11:40 +0000 (22:11 +0000)
committerThalia <thalia.e.chan@googlemail.com>
Wed, 6 Mar 2019 16:20:10 +0000 (16:20 +0000)
Describe the differences between sitewide and partial blocks under the
respective radio options.

Bug: T213101
Change-Id: Ibf098c6becaf4824f8da2cade22e23f4ce00283b

includes/specials/SpecialBlock.php
languages/i18n/en.json
languages/i18n/qqq.json

index a816edc..7330e77 100644 (file)
@@ -143,6 +143,8 @@ class SpecialBlock extends FormSpecialPage {
        protected function getFormFields() {
                global $wgBlockAllowsUTEdit;
 
+               $this->getOutput()->enableOOUI();
+
                $user = $this->getUser();
 
                $suggestedDurations = self::getSuggestedDurations();
@@ -177,8 +179,16 @@ class SpecialBlock extends FormSpecialPage {
                                'type' => 'radio',
                                'cssclass' => 'mw-block-editing-restriction',
                                'options' => [
-                                       $this->msg( 'ipb-sitewide' )->escaped() => 'sitewide',
-                                       $this->msg( 'ipb-partial' )->escaped() => 'partial',
+                                       $this->msg( 'ipb-sitewide' )->escaped() .
+                                               new \OOUI\LabelWidget( [
+                                                       'classes' => [ 'oo-ui-inline-help' ],
+                                                       'label' => $this->msg( 'ipb-sitewide-help' )->text(),
+                                               ] ) => 'sitewide',
+                                       $this->msg( 'ipb-partial' )->escaped() .
+                                               new \OOUI\LabelWidget( [
+                                                       'classes' => [ 'oo-ui-inline-help' ],
+                                                       'label' => $this->msg( 'ipb-partial-help' )->text(),
+                                               ] ) => 'partial',
                                ],
                                'section' => 'actions',
                        ];
index 68fce22..54ce65e 100644 (file)
        "ipb-confirm": "Confirm block",
        "ipb-sitewide": "Sitewide",
        "ipb-partial": "Partial",
+       "ipb-sitewide-help": "Every page on the wiki and all other contribution actions.",
+       "ipb-partial-help": "Specific pages or namespaces.",
        "ipb-pages-label": "Pages",
        "ipb-namespaces-label": "Namespaces",
        "badipaddress": "Invalid IP address",
index 7807d55..383857e 100644 (file)
        "ipb-confirm": "Used as hidden field in the form on [[Special:Block]].",
        "ipb-sitewide": "A type of block the user can select from on [[Special:Block]].",
        "ipb-partial": "A type of block the user can select from on [[Special:Block]].",
+       "ipb-sitewide-help": "Help text describing the effects of a sitewide block on [[Special:Block]]",
+       "ipb-partial-help": "Help text describing the effects of a partial block on  [[Special:Block]]",
        "ipb-pages-label": "The label for an autocomplete text field to specify pages to block a user from editing on [[Special:Block]].",
        "ipb-namespaces-label": "The label for an autocomplete text field to specify namespaces to block a user from editing on [[Special:Block]].",
        "badipaddress": "An error message shown when one entered an invalid IP address in blocking page.",