X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2Ffields%2FHTMLRadioField.php;h=f3bcc0e1eb4712a97e88bca3748870bd55b43208;hb=cde659e4dae4a9eb6cf49521b5250b89b7f8d9d9;hp=06ec3722edbe57a2b43780ff190027c8ac5c6ac9;hpb=ce079cf6ad79ca8d3360817f809b219d166f9153;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/fields/HTMLRadioField.php b/includes/htmlform/fields/HTMLRadioField.php index 06ec3722ed..f3bcc0e1eb 100644 --- a/includes/htmlform/fields/HTMLRadioField.php +++ b/includes/htmlform/fields/HTMLRadioField.php @@ -72,17 +72,13 @@ class HTMLRadioField extends HTMLFormField { ) ); } - protected function shouldInfuseOOUI() { - return true; - } - public function formatOptions( $options, $value ) { global $wgUseMediaWikiUIEverywhere; $html = ''; $attribs = $this->getAttributes( [ 'disabled', 'tabindex' ] ); - $elementFunc = [ 'Html', $this->mOptionsLabelsNotFromMessage ? 'rawElement' : 'element' ]; + $elementFunc = [ Html::class, $this->mOptionsLabelsNotFromMessage ? 'rawElement' : 'element' ]; # @todo Should this produce an unordered list perhaps? foreach ( $options as $label => $info ) { @@ -90,7 +86,7 @@ class HTMLRadioField extends HTMLFormField { $html .= Html::rawElement( 'h1', [], $label ) . "\n"; $html .= $this->formatOptions( $info, $value ); } else { - $id = Sanitizer::escapeId( $this->mID . "-$info" ); + $id = Sanitizer::escapeIdForAttribute( $this->mID . "-$info" ); $classes = [ 'mw-htmlform-flatlist-item' ]; if ( $wgUseMediaWikiUIEverywhere || $this->mParent instanceof VFormHTMLForm ) { $classes[] = 'mw-ui-radio';