X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fhtmlform%2FHTMLButtonField.php;h=9f30ee3de1dab86136f3f68222a5041a0ee7ca2e;hb=6185f5046740b09a29263b468c352ba3cb4ff331;hp=09c0ad97e4623ada6733dc1a4341961cb9175821;hpb=ba8a835dcb3de335a04c81ebe8980a858d478cae;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/htmlform/HTMLButtonField.php b/includes/htmlform/HTMLButtonField.php index 09c0ad97e4..9f30ee3de1 100644 --- a/includes/htmlform/HTMLButtonField.php +++ b/includes/htmlform/HTMLButtonField.php @@ -24,6 +24,21 @@ class HTMLButtonField extends HTMLFormField { return Html::input( $this->mName, $value, $this->buttonType, $attr ); } + /** + * Get the OOUI widget for this field. + * @param string $value + * @return OOUI\ButtonInputWidget + */ + public function getInputOOUI( $value ) { + return new OOUI\ButtonInputWidget( array( + 'name' => $this->mName, + 'value' => $value, + 'type' => $this->buttonType, + 'classes' => array( 'mw-htmlform-submit', $this->mClass ), + 'id' => $this->mID, + ) + $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ) ); + } + protected function needsLabel() { return false; }