Example usage in I2c3d6486e09b3e4d5537b95194e178fd73ac9792
(Special:PageLanguage). Trivial now that we have RadioSelectInputWidget
in OOUI (added in
fd2815e372f6a4beb4f4e5f2a7d9cbf785d40851).
Depends on If68f04a2fa20e7c03763898ab80cf39b5e6cb182 in OOUI.
Bug: T98855
Change-Id: I224e591e58534c07af62eebb9ae4b185225edc33
return $html;
}
+ function getInputOOUI( $value ) {
+ $options = array();
+ foreach ( $this->getOptions() as $label => $value ) {
+ $options[] = array(
+ 'data' => $value,
+ '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 = '';