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 );
67 return Html::input( $this->mButtonName, $this->mButtonValue, $this->mButtonType, $attr );
72 return new \OOUI\ButtonInputWidget( [
73 'name' => $this->mButtonName,
74 'value' => $this->mButtonValue,
75 'type' => $this->mButtonType,
76 'label' => $this->mButtonValue,
77 'flags' => $this->mButtonFlags,
78 'id' => $this->mButtonId ?:
null,
79 ] + \OOUI\Element::configFromHtmlAttributes(
90 return $element .
"\u{00A0}" . $this->
getInputHTML(
'' );
95class_alias( HTMLFormFieldWithButton::class,
'HTMLFormFieldWithButton' );