Merge "Clean-up to global overrides in NewParserTest"
[lhc/web/wiklou.git] / includes / templates / UserloginVForm.php
index 132a7c1..0e688a4 100644 (file)
  */
 class UserloginTemplateVForm extends BaseTemplate {
 
-       /**
-        * Get the Skin object related to this object, so that BaseTemplate msg 31
-        * methods work.
-        *
-        * @return Skin object
-        */
-       public function getSkin() {
-               global $wgOut;
-               return $wgOut->getSkin();
-       }
-
        function execute() {
                global $wgCookieExpiration;
                $expirationDays = ceil( $wgCookieExpiration / ( 3600 * 24 ) );
 ?>
 <div class="mw-ui-container">
        <?php
-       // Some extensions including CAPTCHAs add content to header on UserLoginForm hook.
-       $this->html('header');
-       if( $this->haveData( 'languages' ) ) {
+       if ( $this->haveData( 'languages' ) ) {
        ?>
                <div id="languagelinks">
-                       <p><?php $this->html('languages' ); ?></p>
+                       <p><?php $this->html( 'languages' ); ?></p>
                </div>
        <?php
        }
        ?>
 <div id="userloginForm">
-<form name="userlogin" class="mw-ui-vform" method="post" action="<?php $this->text('action') ?>">
+<form name="userlogin" class="mw-ui-vform" method="post" action="<?php $this->text( 'action' ); ?>">
+       <section class="mw-form-header">
+               <?php $this->html( 'header' ); /* extensions such as ConfirmEdit add form HTML here */ ?>
+       </section>
        <?php
 
-       if( $this->data['message'] ) {
+       if ( $this->data['message'] ) {
        ?>
-               <div class="<?php $this->text('messagetype') ?>box">
+               <div class="<?php $this->text( 'messagetype' ); ?>box">
                <?php
                if ( $this->data['messagetype'] == 'error' ) {
                ?>
-                       <strong><?php $this->msg( 'loginerror' )?></strong><br />
+                       <strong><?php $this->msg( 'loginerror' ) ?></strong><br />
                <?php
                }
-               $this->html('message')
+               $this->html( 'message' );
                ?>
                </div>
        <?php
@@ -103,7 +93,7 @@ class UserloginTemplateVForm extends BaseTemplate {
                <div>
                        <label for='wpPassword1'>
                        <?php
-                       $this->msg('userlogin-yourpassword');
+                       $this->msg( 'userlogin-yourpassword' );
 
                        if ( $this->data['useemail'] && $this->data['canreset'] && $this->data['resetlink'] === true ) {
                                echo Linker::link(
@@ -133,28 +123,28 @@ class UserloginTemplateVForm extends BaseTemplate {
                        ?>
                </div>
        <?php
-       if( isset( $this->data['usedomain'] ) && $this->data['usedomain'] ) {
+       if ( isset( $this->data['usedomain'] ) && $this->data['usedomain'] ) {
                $doms = "";
-               foreach( $this->data['domainnames'] as $dom ) {
+               foreach ( $this->data['domainnames'] as $dom ) {
                        $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
                }
        ?>
                <div id="mw-user-domain-section">
-                       <label for='wpDomain' class="pos-above"><?php $this->msg( 'yourdomain' ) ?></label>
-                               <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
+                       <label for='wpDomain' class="pos-above"><?php $this->msg( 'yourdomain' ); ?></label>
+                               <select name="wpDomain" value="<?php $this->text( 'domain' ); ?>"
                                        tabindex="3">
                                        <?php echo $doms ?>
                                </select>
                </div>
        <?php }
 
-       if( $this->haveData( 'extrafields' ) ) {
+       if ( $this->haveData( 'extrafields' ) ) {
                echo $this->data['extrafields'];
        } ?>
 
                <div>
 
-       <?php if( $this->data['canremember'] ) { ?>
+       <?php if ( $this->data['canremember'] ) { ?>
                <label class="mw-ui-checkbox-label">
                        <input name="wpRemember" type="checkbox" value="1" id="wpRemember" tabindex="4"
                                <?php if ( $this->data['remember'] ) {
@@ -166,7 +156,7 @@ class UserloginTemplateVForm extends BaseTemplate {
        <?php } ?>
                </div>
 
-       <?php if( $this->data['cansecurelogin'] ) { ?>
+       <?php if ( $this->data['cansecurelogin'] ) { ?>
                <div>
                        <label class="mw-ui-checkbox-label">
                                <input name="wpStickHTTPS" type="checkbox" value="1" id="wpStickHTTPS" tabindex="5"
@@ -188,16 +178,16 @@ class UserloginTemplateVForm extends BaseTemplate {
                        ?>
                </div>
                <div id="mw-userlogin-help">
-                       <?php echo $this->getMsg( 'userlogin-helplink' )->parse() ?>
+                       <?php echo $this->getMsg( 'userlogin-helplink' )->parse(); ?>
                </div>
-               <?php if( $this->haveData( 'createOrLoginHref' ) ) { ?>
+               <?php if ( $this->haveData( 'createOrLoginHref' ) ) { ?>
                        <div id="mw-createaccount-cta">
-                               <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ) ?><a href="<?php $this->text( 'createOrLoginHref' ) ?>" id="mw-createaccount-join" tabindex="7"  class="mw-ui-button mw-ui-constructive"><?php $this->msg( 'userlogin-joinproject' ) ?></a></h3>
+                               <h3 id="mw-userloginlink"><?php $this->msg( 'userlogin-noaccount' ); ?><a href="<?php $this->text( 'createOrLoginHref' ); ?>" id="mw-createaccount-join" tabindex="7"  class="mw-ui-button mw-ui-constructive"><?php $this->msg( 'userlogin-joinproject' ); ?></a></h3>
                        </div>
                <?php } ?>
        <input type="hidden" id="mw-useNew" name="useNew" value="1" />
-<?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->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 } ?>
 </form>
 </div>
 </div>