From: S Page Date: Wed, 29 Jan 2014 22:44:42 +0000 (-0800) Subject: Use new mw-ui-constructive Agora styles X-Git-Tag: 1.31.0-rc.0~17084^2 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=d276ff5d0697fe5088b2be970edeb1f65337f5c9;p=lhc%2Fweb%2Fwiklou.git Use new mw-ui-constructive Agora styles The new Agora ("beveled bottom") version deprecates mw-ui-primary. * Use mw-ui-constructive (green) for Login, Create account, and Reset password. * Use mw-ui-progressive (blue) for Join and Search. A separate change I90954ea will implement right-aligned and quieter button layout. Bug: 60596 Change-Id: Ia1fe557e7ebeac011c5da7297e848c1bfee7910f --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 0aea0706ef..1e8da45d80 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -812,7 +812,8 @@ 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"; diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index 18e777a426..9e5143f087 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -1109,7 +1109,7 @@ class SpecialSearch extends SpecialPage { $out .= Html::hidden( 'fulltext', 'Search' ) . "\n"; $out .= Xml::submitButton( $this->msg( 'searchbutton' )->text(), - array( 'class' => array( 'mw-ui-button', 'mw-ui-primary' ) ) + array( 'class' => array( 'mw-ui-button', 'mw-ui-progressive' ) ) ) . "\n"; return $out . $this->didYouMeanHtml; } diff --git a/includes/templates/Usercreate.php b/includes/templates/Usercreate.php index 12210d0241..0cb83d555e 100644 --- a/includes/templates/Usercreate.php +++ b/includes/templates/Usercreate.php @@ -254,7 +254,7 @@ class UsercreateTemplate extends BaseTemplate { $this->getMsg( $this->data['loggedin'] ? 'createacct-another-submit' : 'createacct-submit' ), 'submit', array( - 'class' => "mw-ui-button mw-ui-big mw-ui-block mw-ui-primary", + 'class' => "mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive", 'id' => 'wpCreateaccount', 'tabindex' => $tabIndex++ ) diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 38e071c86a..e5d8a1c47e 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -149,7 +149,7 @@ class UserloginTemplate extends BaseTemplate { echo Html::input( 'wpLoginAttempt', $this->getMsg( 'login' )->text(), 'submit', array( 'id' => 'wpLoginAttempt', 'tabindex' => '6', - 'class' => 'mw-ui-button mw-ui-big mw-ui-block mw-ui-primary' + 'class' => 'mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive' ) ); ?> @@ -164,7 +164,7 @@ class UserloginTemplate extends BaseTemplate {
- +