From d276ff5d0697fe5088b2be970edeb1f65337f5c9 Mon Sep 17 00:00:00 2001 From: S Page Date: Wed, 29 Jan 2014 14:44:42 -0800 Subject: [PATCH] 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 --- includes/htmlform/HTMLForm.php | 3 ++- includes/specials/SpecialSearch.php | 2 +- includes/templates/Usercreate.php | 2 +- includes/templates/Userlogin.php | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) 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 {
- +
-- 2.20.1