Consolidate mobile and desktop designs for login form

* Stop sign up button from being a button
* Move password reset to bottom of form

Bug: T85189
Change-Id: I175e9f515d962f9078845f25f9b96079819444c6
This commit is contained in:
jdlrobson 2014-12-22 15:53:39 -08:00 committed by Jdlrobson
parent c84ef07303
commit f6d0456175
3 changed files with 20 additions and 29 deletions

View file

@ -90,14 +90,6 @@ class UserloginTemplate extends BaseTemplate {
<label for='wpPassword1'>
<?php
$this->msg( 'userlogin-yourpassword' );
if ( $this->data['useemail'] && $this->data['canreset'] && $this->data['resetlink'] === true ) {
echo ' ' . Linker::link(
SpecialPage::getTitleFor( 'PasswordReset' ),
$this->getMsg( 'userlogin-resetpassword-link' )->parse(),
array( 'class' => 'mw-ui-flush-right' )
);
}
?>
</label>
<?php
@ -160,7 +152,7 @@ class UserloginTemplate extends BaseTemplate {
?>
</div>
<div class="mw-ui-vform-field" id="mw-userlogin-help">
<div class="mw-ui-vform-field mw-form-related-link-container" id="mw-userlogin-help">
<?php
echo Html::element(
'a',
@ -173,14 +165,26 @@ class UserloginTemplate extends BaseTemplate {
);
?>
</div>
<?php if ( $this->haveData( 'createOrLoginHref' ) ) { ?>
<?php if ( $this->data['loggedin'] ) { ?>
<div id="mw-createaccount-another">
<a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7" class="mw-ui-button"><?php $this->msg( 'userlogin-createanother' ); ?></a>
<?php
if ( $this->haveData( 'createOrLoginHref' ) ) {
if ( $this->data['useemail'] && $this->data['canreset'] && $this->data['resetlink'] === true ) {
echo Html::openElement( 'div',
array(
'class' => 'mw-ui-vform-field mw-form-related-link-container',
)
) .
Linker::link(
SpecialPage::getTitleFor( 'PasswordReset' ),
$this->getMsg( 'userlogin-resetpassword-link' )->parse()
) .
Html::closeElement( 'div' );
}
if ( $this->data['loggedin'] ) { ?>
<div id="mw-createaccount-another" class="mw-form-related-link-container mw-ui-vform-field">
<a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7"><?php $this->msg( 'userlogin-createanother' ); ?></a>
</div>
<?php } else { ?>
<div id="mw-createaccount-cta">
<div id="mw-createaccount-cta" class="mw-form-related-link-container mw-ui-vform-field">
<?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>
</div>
<?php } ?>

View file

@ -1,5 +1,5 @@
/* Styles for user login and signup forms */
#mw-userlogin-help {
.mw-form-related-link-container {
text-align: center;
}

View file

@ -7,16 +7,3 @@
margin: 0 auto;
padding-top: 4em;
}
#mw-createaccount-cta,
#mw-createaccount-another {
font-size: 0.9em;
font-weight: normal;
text-align: center;
}
#mw-createaccount-join {
margin-left: 0.75em;
width: auto;
display: inline-block;
}