ImagePage.php: add missing braces + other code style tweaks
[lhc/web/wiklou.git] / includes / templates / Userlogin.php
index 7693223..34a5db7 100644 (file)
@@ -1,9 +1,15 @@
 <?php
 /**
- * @defgroup Templates Templates
+ * Html forms for user login and account creation
+ *
  * @file
  * @ingroup Templates
  */
+
+/**
+ * @defgroup Templates Templates
+ */
+
 if( !defined( 'MEDIAWIKI' ) ) die( -1 );
 
 /**
@@ -61,7 +67,7 @@ class UserloginTemplate extends QuickTemplate {
 
                        </td>
                </tr>
-       <?php if( $this->data['usedomain'] ) {
+       <?php if( isset( $this->data['usedomain'] ) && $this->data['usedomain'] ) {
                $doms = "";
                foreach( $this->data['domainnames'] as $dom ) {
                        $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
@@ -77,6 +83,11 @@ class UserloginTemplate extends QuickTemplate {
                        </td>
                </tr>
        <?php }
+
+       if( $this->haveData( 'extrafields' ) ) {
+               echo $this->data['extrafields'];
+       }
+
        if( $this->data['canremember'] ) { ?>
                <tr>
                        <td></td>
@@ -88,11 +99,27 @@ class UserloginTemplate extends QuickTemplate {
                                        'wpRemember',
                                        'wpRemember',
                                        $this->data['remember'],
-                                       array( 'tabindex' => '4' )
+                                       array( 'tabindex' => '8' )
                                )
                                ?>
                        </td>
                </tr>
+<?php } ?>
+<?php if( $this->data['cansecurelogin'] ) { ?>
+               <tr>
+                       <td></td>
+                       <td class="mw-input">
+                       <?php
+                       echo Xml::checkLabel(
+                               wfMsg( 'securelogin-stick-https' ),
+                               'wpStickHTTPS',
+                               'wpStickHTTPS',
+                               $this->data['stickHTTPS'],
+                               array( 'tabindex' => '9' )
+                       );
+               ?>
+                       </td>
+               </tr>
 <?php } ?>
                <tr>
                        <td></td>
@@ -100,13 +127,13 @@ class UserloginTemplate extends QuickTemplate {
                                <?php
                echo Html::input( 'wpLoginAttempt', wfMsg( 'login' ), 'submit', array(
                        'id' => 'wpLoginAttempt',
-                       'tabindex' => '5'
+                       'tabindex' => '9'
                ) );
                if ( $this->data['useemail'] && $this->data['canreset'] ) {
                        echo '&#160;';
                        echo Html::input( 'wpMailmypassword', wfMsg( 'mailmypassword' ), 'submit', array(
                                'id' => 'wpMailmypassword',
-                               'tabindex' => '6'
+                               'tabindex' => '10'
                        ) );
                } ?>
 
@@ -148,6 +175,8 @@ class UsercreateTemplate extends QuickTemplate {
        </div>
        <div class="visualClear"></div>
 <?php } ?>
+
+<div id="signupstart"><?php $this->msgWiki( 'signupstart' ); ?></div>
 <div id="userlogin">
 
 <form name="userlogin2" id="userlogin2" method="post" action="<?php $this->text('action') ?>">
@@ -226,11 +255,15 @@ class UsercreateTemplate extends QuickTemplate {
                        'size' => '20'
                ) ); ?>
                                        <div class="prefsectiontip">
-                                               <?php if( $this->data['emailrequired'] ) {
-                                                                       $this->msgWiki('prefs-help-email-required');
-                                                     } else {
-                                                                       $this->msgWiki('prefs-help-email');
-                                                     } ?>
+                                               <?php  // duplicated in Preferences.php profilePreferences()
+                                                       if( $this->data['emailrequired'] ) {
+                                                               $this->msgWiki('prefs-help-email-required');
+                                                       } else {
+                                                               $this->msgWiki('prefs-help-email');
+                                                       }
+                                                       if( $this->data['emailothers'] ) {
+                                                               $this->msgWiki('prefs-help-email-others');
+                                                       } ?>
                                        </div>
                                </td>
                                <td></td>