protected $mFieldTree;
protected $mShowReset = false;
protected $mShowSubmit = true;
+ protected $mSubmitModifierClass = 'mw-ui-constructive';
protected $mSubmitCallback;
protected $mValidationErrorMessage;
$attribs['class'] = array( 'mw-htmlform-submit' );
if ( $this->isVForm() || $useMediaWikiUIEverywhere ) {
- array_push( $attribs['class'], 'mw-ui-button', 'mw-ui-constructive' );
+ array_push( $attribs['class'], 'mw-ui-button', $this->mSubmitModifierClass );
}
if ( $this->isVForm() ) {
return $this;
}
+ /**
+ * Identify that the submit button in the form has a destructive action
+ *
+ */
+ public function setSubmitDestructive() {
+ $this->mSubmitModifierClass = 'mw-ui-destructive';
+ }
+
/**
* Set the text for the submit button to a message
* @since 1.19