Use new mw-ui-constructive Agora styles
authorS Page <spage@wikimedia.org>
Wed, 29 Jan 2014 22:44:42 +0000 (14:44 -0800)
committerSpage <spage@wikimedia.org>
Thu, 30 Jan 2014 01:17:00 +0000 (01:17 +0000)
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 <wiki> and Search.

A separate change I90954ea will implement right-aligned and quieter button layout.

Bug: 60596
Change-Id: Ia1fe557e7ebeac011c5da7297e848c1bfee7910f

includes/htmlform/HTMLForm.php
includes/specials/SpecialSearch.php
includes/templates/Usercreate.php
includes/templates/Userlogin.php

index 0aea070..1e8da45 100644 (file)
@@ -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";
index 18e777a..9e5143f 100644 (file)
@@ -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;
        }
index 12210d0..0cb83d5 100644 (file)
@@ -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++
                                        )
index 38e071c..e5d8a1c 100644 (file)
@@ -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'
                                ) );
                                ?>
                        </div>
@@ -164,7 +164,7 @@ class UserloginTemplate extends BaseTemplate {
                                        </div>
                                <?php } else { ?>
                                        <div id="mw-createaccount-cta">
-                                               <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ); ?><a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7"  class="mw-ui-button mw-ui-constructive"><?php $this->msg( 'userlogin-joinproject' ); ?></a></h3>
+                                               <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ); ?><a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7"  class="mw-ui-button mw-ui-progressive"><?php $this->msg( 'userlogin-joinproject' ); ?></a></h3>
                                        </div>
                                <?php } ?>
                        <?php } ?>