X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLRadioField.php;h=2d057042ef48c04bb3cfb11334186421d508a5e9;hb=e5361a6a6d1c1786c8dc2e8e7e69fb1a1d7a310b;hp=0f0054089014780dab5ec91a01a2c8f3bdbdf1ea;hpb=4f1067e27efe648e6089ab0b28fac1b2c3481816;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLRadioField.php b/includes/htmlform/HTMLRadioField.php index 0f00540890..2d057042ef 100644 --- a/includes/htmlform/HTMLRadioField.php +++ b/includes/htmlform/HTMLRadioField.php @@ -38,6 +38,23 @@ class HTMLRadioField extends HTMLFormField { return $html; } + function getInputOOUI( $value ) { + $options = array(); + foreach ( $this->getOptions() as $label => $data ) { + $options[] = array( + 'data' => $data, + 'label' => $this->mOptionsLabelsNotFromMessage ? new OOUI\HtmlSnippet( $label ) : $label, + ); + } + + return new OOUI\RadioSelectInputWidget( array( + 'name' => $this->mName, + 'value' => $value, + 'options' => $options, + 'classes' => 'mw-htmlform-flatlist-item', + ) + $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ) ); + } + function formatOptions( $options, $value ) { $html = '';