From: Thalia Date: Wed, 27 Feb 2019 22:11:40 +0000 (+0000) Subject: Add help text to "partial" and "sitewide" options on Special:Block X-Git-Tag: 1.34.0-rc.0~2633^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=c6ca1cf390e20adf632e992a4a1b3e013162cdef;p=lhc%2Fweb%2Fwiklou.git Add help text to "partial" and "sitewide" options on Special:Block Describe the differences between sitewide and partial blocks under the respective radio options. Bug: T213101 Change-Id: Ibf098c6becaf4824f8da2cade22e23f4ce00283b --- diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index a816edcaee..7330e7751e 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -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', ]; diff --git a/languages/i18n/en.json b/languages/i18n/en.json index 68fce22ff8..54ce65e293 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2605,6 +2605,8 @@ "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", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 7807d55a42..383857ee84 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -2811,6 +2811,8 @@ "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.",