diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/templates/Userlogin.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/templates/Userlogin.php')
-rw-r--r-- | includes/templates/Userlogin.php | 75 |
1 files changed, 49 insertions, 26 deletions
diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 8bba4265..345bb71b 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -70,12 +70,10 @@ class UserloginTemplate extends BaseTemplate { ?> </label> <?php - $extraAttrs = array(); echo Html::input( 'wpName', $this->data['name'], 'text', array( 'class' => 'loginText mw-ui-input', 'id' => 'wpName1', 'tabindex' => '1', - 'size' => '20', // 'required' is blacklisted for now in Html.php due to browser issues. // Keeping here in case that changes. 'required' => true, @@ -90,14 +88,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 @@ -105,7 +95,6 @@ class UserloginTemplate extends BaseTemplate { 'class' => 'loginPassword mw-ui-input', 'id' => 'wpPassword1', 'tabindex' => '2', - 'size' => '20', // Set focus to this field if username is filled in. 'autofocus' => (bool)$this->data['name'], 'placeholder' => $this->getMsg( 'userlogin-yourpassword-ph' )->text() @@ -148,15 +137,19 @@ class UserloginTemplate extends BaseTemplate { <div class="mw-ui-vform-field"> <?php - echo Html::input( 'wpLoginAttempt', $this->getMsg( 'pt-login-button' )->text(), 'submit', array( + $attrs = array( 'id' => 'wpLoginAttempt', + 'name' => 'wpLoginAttempt', 'tabindex' => '6', - 'class' => 'mw-ui-button mw-ui-big mw-ui-block mw-ui-constructive' - ) ); + ); + $modifiers = array( + 'mw-ui-constructive', + ); + echo Html::submitButton( $this->getMsg( 'pt-login-button' )->text(), $attrs, $modifiers ); ?> </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', @@ -169,21 +162,51 @@ class UserloginTemplate extends BaseTemplate { ); ?> </div> + <?php - <?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> + if ( $this->data['useemail'] && $this->data['canreset'] && $this->data['resetlink'] === true ) { + echo Html::rawElement( + 'div', + array( + 'class' => 'mw-ui-vform-field mw-form-related-link-container', + ), + Linker::link( + SpecialPage::getTitleFor( 'PasswordReset' ), + $this->getMsg( 'userlogin-resetpassword-link' )->escaped() + ) + ); + } + + if ( $this->haveData( 'createOrLoginHref' ) ) { + if ( $this->data['loggedin'] ) { ?> + <div 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"> - <?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 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 } ?> - <?php } ?> - <?php if ( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?> - <?php if ( $this->haveData( 'token' ) ) { ?><input type="hidden" name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?> - <?php if ( $this->data['cansecurelogin'] ) {?><input type="hidden" name="wpForceHttps" value="<?php $this->text( 'stickhttps' ); ?>" /><?php } ?> + <?php + } + } + + // Hidden fields + $fields = ''; + if ( $this->haveData( 'uselang' ) ) { + $fields .= Html::hidden( 'uselang', $this->data['uselang'] ); + } + if ( $this->haveData( 'token' ) ) { + $fields .= Html::hidden( 'wpLoginToken', $this->data['token'] ); + } + if ( $this->data['cansecurelogin'] ) { + $fields .= Html::hidden( 'wpForceHttps', $this->data['stickhttps'] ); + } + if ( $this->data['cansecurelogin'] && $this->haveData( 'fromhttp' ) ) { + $fields .= Html::hidden( 'wpFromhttp', $this->data['fromhttp'] ); + } + echo $fields; + + ?> </form> </div> </div> |