?>
</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,
'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()
'tabindex' => '6',
);
$modifiers = array(
- 'mw-ui-big', 'mw-ui-block', 'mw-ui-constructive',
+ 'mw-ui-big', 'mw-ui-constructive',
);
echo Html::submitButton( $this->getMsg( 'pt-login-button' )->text(), $attrs, $modifiers );
?>
?>
</div>
<?php
+
+ 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['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">
+ <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" 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>
+ <?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 if ( $this->data['cansecurelogin'] && $this->haveData( 'fromhttp' )) {?><input type="hidden" name="wpFromhttp" value="<?php $this->text( 'fromhttp' ); ?>" /><?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>