Remove PHP Notice: Undefined index: usedomain in phase3/includes/templates/Userlogin...
authorPlatonides <platonides@users.mediawiki.org>
Tue, 19 Oct 2010 21:02:03 +0000 (21:02 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 19 Oct 2010 21:02:03 +0000 (21:02 +0000)
Add extradata data for adding fields from an extension.

includes/templates/Userlogin.php

index 34f7bbe..92ad9cb 100644 (file)
@@ -67,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>";
@@ -83,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>
@@ -94,7 +99,7 @@ class UserloginTemplate extends QuickTemplate {
                                        'wpRemember',
                                        'wpRemember',
                                        $this->data['remember'],
-                                       array( 'tabindex' => '4' )
+                                       array( 'tabindex' => '8' )
                                )
                                ?>
                        </td>
@@ -106,13 +111,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'
                        ) );
                } ?>