X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ftemplates%2FUserlogin.php;h=34a5db7ab2a69e935bcf235a7e4b5790044d4fa6;hb=0a45ed6a91a3acc15cb6cc58a2b343a4bed0de16;hp=7a6f03a12cecbbe93c3f1dfb4370949ee8bf49d1;hpb=c6c1faae422f6fc6621c2242e1016b550a30b98b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php index 7a6f03a12c..34a5db7ab2 100644 --- a/includes/templates/Userlogin.php +++ b/includes/templates/Userlogin.php @@ -1,82 +1,147 @@ data['error'] ) { + if( $this->data['message'] ) { ?> -
-

msg('loginerror') ?>:

- html('error') ?> +
+ data['messagetype'] == 'error' ) { ?> + msg( 'loginerror' )?>
+ + html('message') ?>
-
+
msgWiki( 'loginstart' ); ?>
+

msg('login') ?>

+ html('header'); /* pre-table point for form plugins... */ ?>
msgWiki('loginprompt') ?>
+ haveData( 'languages' ) ) { ?> - - + - - + - data['usedomain'] ) { + data['usedomain'] ) && $this->data['usedomain'] ) { $doms = ""; foreach( $this->data['domainnames'] as $dom ) { $doms .= ""; } ?> - - - + + - + haveData( 'extrafields' ) ) { + echo $this->data['extrafields']; + } + + if( $this->data['canremember'] ) { ?> - + +data['cansecurelogin'] ) { ?> - + + + + +
- + + 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' => '' ) ) ); ?> +
- + + 'loginPassword', + 'id' => 'wpPassword1', + 'tabindex' => '2', + 'size' => '20' + ) + ( $this->data['name'] ? array( 'autofocus' ) : array() ) ); ?> +
msg( 'yourdomainname' ) ?>: -
msg( 'yourdomainname' ) ?> +
- data['remember'] ) { ?>checked="checked" - /> + + formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) ), + 'wpRemember', + 'wpRemember', + $this->data['remember'], + array( 'tabindex' => '8' ) + ) + ?>
-  data['useemail'] ) { ?> - + + data['stickHTTPS'], + array( 'tabindex' => '9' ) + ); + ?> +
+ 'wpLoginAttempt', + 'tabindex' => '9' + ) ); + if ( $this->data['useemail'] && $this->data['canreset'] ) { + echo ' '; + echo Html::input( 'wpMailmypassword', wfMsg( 'mailmypassword' ), 'submit', array( + 'id' => 'wpMailmypassword', + 'tabindex' => '10' + ) ); + } ?> +
+haveData( 'uselang' ) ) { ?> +haveData( 'token' ) ) { ?>
msgWiki( 'loginend' ); ?>
@@ -85,36 +150,68 @@ class UserloginTemplate extends QuickTemplate { } } +/** + * @ingroup Templates + */ class UsercreateTemplate extends QuickTemplate { + function addInputItem( $name, $value, $type, $msg, $helptext = false ) { + $this->data['extraInput'][] = array( + 'name' => $name, + 'value' => $value, + 'type' => $type, + 'msg' => $msg, + 'helptext' => $helptext, + ); + } + function execute() { - if( $this->data['error'] ) { + if( $this->data['message'] ) { ?> -
-

msg('loginerror') ?>:

- html('error') ?> +
+ data['messagetype'] == 'error' ) { ?> + msg( 'loginerror' )?>
+ + html('message') ?>
+ +
msgWiki( 'signupstart' ); ?>
-data['create'] ) { ?>

msg('createaccount') ?>

+ html('header'); /* pre-table point for form plugins... */ ?> + haveData( 'languages' ) ) { ?> - - + + - - + + data['usedomain'] ) { $doms = ""; @@ -123,71 +220,159 @@ class UsercreateTemplate extends QuickTemplate { } ?> - - + + - - + + data['useemail'] ) { ?> - - + + data['userealname'] ) { ?> - - + + + + data['usereason'] ) { ?> + + + + + data['canremember'] ) { ?> - + +data['extraInput'] ) && is_array( $this->data['extraInput'] ) ) { + foreach ( $this->data['extraInput'] as $inputItem ) { ?> + + + + - -
- + + data['name'], 'text', array( + 'class' => 'loginText', + 'id' => 'wpName2', + 'tabindex' => '1', + 'size' => '20', + 'required', + 'autofocus' + ) ); ?>
- + + 'loginPassword', + 'id' => 'wpPassword2', + 'tabindex' => '2', + 'size' => '20' + ) + User::passwordChangeInputAttribs() ); ?>
msg( 'yourdomainname' ) ?>: - msg( 'yourdomainname' ) ?> +
- + + 'loginPassword', + 'id' => 'wpRetype', + 'tabindex' => '4', + 'size' => '20' + ) + User::passwordChangeInputAttribs() ); ?>
- + + data['email'], 'email', array( + 'class' => 'loginText', + 'id' => 'wpEmail', + 'tabindex' => '5', + 'size' => '20' + ) ); ?> +
+ data['emailrequired'] ) { + $this->msgWiki('prefs-help-email-required'); + } else { + $this->msgWiki('prefs-help-email'); + } + if( $this->data['emailothers'] ) { + $this->msgWiki('prefs-help-email-others'); + } ?> +
+ +
+ msgWiki('prefs-help-realname'); ?> +
+
+
- data['remember'] ) { ?>checked="checked" - /> + + formatNum( ceil( $wgCookieExpiration / ( 3600 * 24 ) ) ) ), + 'wpRemember', + 'wpRemember', + $this->data['remember'], + array( 'tabindex' => '8' ) + ) + ?> +
+ /> + +
+ msgWiki( $inputItem['helptext'] ); ?> +
+
+ data['createemail'] ) { ?>
- data['useemail'] ) { - echo '
'; - $this->msgHtml( 'emailforlost' ); - echo '
'; - } - - ?> +haveData( 'uselang' ) ) { ?> +haveData( 'token' ) ) { ?>
msgWiki( 'signupend' ); ?>
@@ -195,5 +380,3 @@ class UsercreateTemplate extends QuickTemplate { } } - -?>