In some exotic use cases where the form is rendered straight from
a successful submit this prevents unexpected button text changes.
Change-Id: I61619b6222d9fb29c63ce7c1f3ceff512143c4f7
'id' => $this->mID,
'type' => $this->buttonType,
'name' => $this->mName,
'id' => $this->mID,
'type' => $this->buttonType,
'name' => $this->mName,
+ 'value' => $this->getDefault(),
] + $this->getAttributes( [ 'disabled', 'tabindex' ] );
if ( $this->isBadIE() ) {
return Html::element( 'input', $attr );
} else {
] + $this->getAttributes( [ 'disabled', 'tabindex' ] );
if ( $this->isBadIE() ) {
return Html::element( 'input', $attr );
} else {
- return Html::rawElement( 'button', $attr, $this->buttonLabel ?: htmlspecialchars( $value ) );
+ return Html::rawElement( 'button', $attr,
+ $this->buttonLabel ?: htmlspecialchars( $this->getDefault() ) );
public function getInputOOUI( $value ) {
return new OOUI\ButtonInputWidget( [
'name' => $this->mName,
public function getInputOOUI( $value ) {
return new OOUI\ButtonInputWidget( [
'name' => $this->mName,
+ 'value' => $this->getDefault(),
'label' => !$this->isBadIE() && $this->buttonLabel
? new OOUI\HtmlSnippet( $this->buttonLabel )
'label' => !$this->isBadIE() && $this->buttonLabel
? new OOUI\HtmlSnippet( $this->buttonLabel )
'type' => $this->buttonType,
'classes' => [ 'mw-htmlform-submit', $this->mClass ],
'id' => $this->mID,
'type' => $this->buttonType,
'classes' => [ 'mw-htmlform-submit', $this->mClass ],
'id' => $this->mID,