From: jenkins-bot Date: Sat, 8 Feb 2014 03:25:09 +0000 (+0000) Subject: Merge "Fix HTML output arround HTMLForm's submit buttons when in vform" X-Git-Tag: 1.31.0-rc.0~16974 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=f73c54a0a47585f4baf1aee38a4a1a059bfb259c;p=lhc%2Fweb%2Fwiklou.git Merge "Fix HTML output arround HTMLForm's submit buttons when in vform" --- f73c54a0a47585f4baf1aee38a4a1a059bfb259c diff --cc includes/htmlform/HTMLForm.php index f3b7ce7f4d,6af2f5f745..422fa8a311 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@@ -812,24 -809,10 +812,17 @@@ class HTMLForm extends ContextSource if ( $this->isVForm() ) { // mw-ui-block is necessary because the buttons aren't necessarily in an // immediate child div of the vform. - array_push( $attribs['class'], 'mw-ui-button', 'mw-ui-big', 'mw-ui-primary', 'mw-ui-block' ); + // @todo Let client specify if the primary submit button is progressive or destructive + array_push( + $attribs['class'], + 'mw-ui-button', + 'mw-ui-big', + 'mw-ui-constructive', + 'mw-ui-block' + ); } - $html .= Xml::submitButton( $this->getSubmitText(), $attribs ) . "\n"; - - // Buttons are top-level form elements in table and div layouts, - // but vform wants all elements inside divs to get spaced-out block - // styling. - if ( $this->isVForm() ) { - $html = Html::rawElement( 'div', null, "\n$html\n" ); - } + $buttons .= Xml::submitButton( $this->getSubmitText(), $attribs ) . "\n"; } if ( $this->mShowReset ) {