protected $mFieldTree;
protected $mShowReset = false;
protected $mShowSubmit = true;
- protected $mSubmitFlag = 'constructive';
+ protected $mSubmitFlags = array( 'constructive', 'primary' );
protected $mSubmitCallback;
protected $mValidationErrorMessage;
$attribs['class'] = array( 'mw-htmlform-submit' );
if ( $useMediaWikiUIEverywhere ) {
- array_push( $attribs['class'], 'mw-ui-button', 'mw-ui-' . $this->mSubmitFlag );
+ foreach ( $this->mSubmitFlags as $flag ) {
+ array_push( $attribs['class'], 'mw-ui-' . $flag );
+ }
+ array_push( $attribs['class'], 'mw-ui-button' );
}
$buttons .= Xml::submitButton( $this->getSubmitText(), $attribs ) . "\n";
* @since 1.24
*/
public function setSubmitDestructive() {
- $this->mSubmitFlag = 'destructive';
+ $this->mSubmitFlags = array( 'destructive', 'primary' );
}
/**
* @since 1.25
*/
public function setSubmitProgressive() {
- $this->mSubmitFlag = 'progressive';
+ $this->mSubmitFlags = array( 'progressive', 'primary' );
}
/**
$attribs['type'] = 'submit';
$attribs['label'] = $this->getSubmitText();
$attribs['value'] = $this->getSubmitText();
- $attribs['flags'] = array( $this->mSubmitFlag );
+ $attribs['flags'] = $this->mSubmitFlags;
$buttons .= new OOUI\ButtonInputWidget( $attribs );
}
$attribs['class'] = array(
'mw-htmlform-submit',
'mw-ui-button mw-ui-big mw-ui-block',
- 'mw-ui-' . $this->mSubmitFlag,
);
+ foreach ( $this->mSubmitFlags as $flag ) {
+ $attribs['class'][] = 'mw-ui-' . $flag;
+ }
$buttons .= Xml::submitButton( $this->getSubmitText(), $attribs ) . "\n";
}