39 if ( isset( $info[
'buttonclass'] ) ) {
40 $this->mButtonClass = $info[
'buttonclass'];
42 if ( isset( $info[
'buttonid'] ) ) {
43 $this->mButtonId = $info[
'buttonid'];
45 if ( isset( $info[
'buttonname'] ) ) {
46 $this->mButtonName = $info[
'buttonname'];
48 if ( isset( $info[
'buttondefault'] ) ) {
49 $this->mButtonValue = $info[
'buttondefault'];
51 if ( isset( $info[
'buttontype'] ) ) {
52 $this->mButtonType = $info[
'buttontype'];
54 if ( isset( $info[
'buttonflags'] ) ) {
55 $this->mButtonFlags = $info[
'buttonflags'];
57 parent::__construct( $info );
66 return Html::input( $this->mButtonName, $this->mButtonValue, $this->mButtonType, $attr );
70 return new \OOUI\ButtonInputWidget( [
71 'name' => $this->mButtonName,
72 'value' => $this->mButtonValue,
73 'type' => $this->mButtonType,
74 'label' => $this->mButtonValue,
75 'flags' => $this->mButtonFlags,
76 'id' => $this->mButtonId ?:
null,
77 ] + \OOUI\Element::configFromHtmlAttributes(
88 return $element .
"\u{00A0}" . $this->
getInputHTML(
'' );
93class_alias( HTMLFormFieldWithButton::class,
'HTMLFormFieldWithButton' );