X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ftemplates%2FUserlogin.php;h=b9825a6b39c32cd845528aeacb9ccafc60bc718c;hb=44840d15929d8ecfc1d7c31d6f7e86d873ac15a2;hp=7bc0241a35c9b66a37a8a216b0f3d4b0ad96a0b9;hpb=ee49f98d6bbc834f8b807499a3d219e67a4b79e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 7bc0241a35..b9825a6b39 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -1,6 +1,6 @@ data['message'] ) { + global $wgCookieExpiration; + $expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) ); ?> -
- data['messagetype'] == 'error' ) { ?> - msg( 'loginerror' )?>
- - html('message') ?> -
-
- - -
msgWiki( 'loginstart' ); ?>
+
+ haveData( 'languages' ) ) { + ?> + +
-
-

msg('login') ?>

- - html('header'); /* pre-table point for form plugins... */ ?> -
msgWiki('loginprompt') ?>
- haveData( 'languages' ) ) { ?> - - - - - - - - - - data['usedomain'] ) && $this->data['usedomain'] ) { + 'size' => '20', + 'placeholder' => $this->getMsg( 'userlogin-yourpassword-ph' )->text() + ) + $extraAttrs ); + ?> + + data['usedomain'] ) && $this->data['usedomain'] ) { $doms = ""; - foreach( $this->data['domainnames'] as $dom ) { + foreach ( $this->data['domainnames'] as $dom ) { $doms .= ""; } ?> - - - - + haveData( 'extrafields' ) ) { + if ( $this->haveData( 'extrafields' ) ) { echo $this->data['extrafields']; - } + } ?> - if( $this->data['canremember'] ) { ?> - - - - - -data['cansecurelogin'] ) { ?> - - - - - - - - - -
+ +
+ html( 'header' ); /* extensions such as ConfirmEdit add form HTML here */ ?> +
+ data['message'] ) { + ?> +
+ data['messagetype'] == 'error' ) { + ?> + msg( 'loginerror' ) ?>
+ html( 'message' ); + ?> +
+ +
+ + data['name'] ) { + $extraAttrs['autofocus'] = ''; + } echo Html::input( 'wpName', $this->data['name'], 'text', array( 'class' => 'loginText', 'id' => 'wpName1', 'tabindex' => '1', 'size' => '20', - 'required' - # Can't do + array( 'autofocus' ) because + for arrays in PHP - # only works right for associative arrays! Thanks, PHP. - ) + ( $this->data['name'] ? array() : array( 'autofocus' => '' ) ) ); ?> + // 'required' is blacklisted for now in Html.php due to browser issues. + // Keeping here in case that changes + 'required', + 'placeholder' => $this->getMsg( 'userlogin-yourname-ph' )->text() + ) + $extraAttrs ); + ?> +
+
+
- 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' ) + ); + } + ?> + + data['name'] ) { + $extraAttrs['autofocus'] = ''; + } echo Html::input( 'wpPassword', null, 'password', array( 'class' => 'loginPassword', 'id' => 'wpPassword1', 'tabindex' => '2', - 'size' => '20' - ) + ( $this->data['name'] ? array( 'autofocus' ) : array() ) ); ?> - -
msg( 'yourdomainname' ) ?> - -
- numParams( $expirationDays )->text(), - 'wpRemember', - 'wpRemember', - $this->data['remember'], - array( 'tabindex' => '8' ) - ) - ?> -
- text(), - 'wpStickHTTPS', - 'wpStickHTTPS', - $this->data['stickHTTPS'], - array( 'tabindex' => '9' ) - ); - ?> -
- text(), 'submit', array( - 'id' => 'wpLoginAttempt', - 'tabindex' => '9' - ) ); - if ( $this->data['useemail'] && $this->data['canreset'] ) { - if( $this->data['resetlink'] === true ) { - echo ' '; - echo Linker::link( - SpecialPage::getTitleFor( 'PasswordReset' ), - wfMessage( 'userlogin-resetlink' ) - ); - } elseif( $this->data['resetlink'] === null ) { - echo ' '; - echo Html::input( - 'wpMailmypassword', - wfMessage( 'mailmypassword' )->text(), - 'submit', array( - 'id' => 'wpMailmypassword', - 'tabindex' => '10' - ) - ); - } - } ?> +
-
-haveData( 'uselang' ) ) { ?> -haveData( 'token' ) ) { ?> + data['canremember'] ) { ?> + + +
+ + data['cansecurelogin'] ) { ?> +
+ +
+ +
+ getMsg( 'login' )->text(), 'submit', array( + 'id' => 'wpLoginAttempt', + 'tabindex' => '6', + 'class' => 'mw-ui-button mw-ui-big mw-ui-block mw-ui-primary' + ) ); + ?> +
+
+ getMsg( 'userlogin-helplink' )->parse(); ?> +
+ haveData( 'createOrLoginHref' ) ) { ?> +
+ +
+ +haveData( 'uselang' ) ) { ?> +haveData( 'token' ) ) { ?>
-
html( 'loginend' ); ?>
+