Merge "Revert "Introducing ContentGetParserOutput hook.""
[lhc/web/wiklou.git] / includes / templates / UsercreateVForm.php
index 0472b8d..9258881 100644 (file)
@@ -71,7 +71,7 @@ class UsercreateTemplateVForm extends BaseTemplate {
 ?>
                <div class="<?php $this->text( 'messagetype' ); ?>box">
                <?php if ( $this->data['messagetype'] == 'error' ) { ?>
-                       <strong><?php $this->msg( 'loginerror' )?></strong><br />
+                       <strong><?php $this->msg( 'createacct-error' ); ?></strong><br />
                <?php } ?>
                <?php $this->html( 'message' ); ?>
                </div>
@@ -80,7 +80,7 @@ class UsercreateTemplateVForm extends BaseTemplate {
                        <label for='wpName2'>
                                <?php $this->msg( 'userlogin-yourname' ); ?>
 
-                               <span class="mw-ui-flush-right"><?php echo $this->getMsg( 'createacct-helpusername-link' )->parse(); ?></span>
+                               <span class="mw-ui-flush-right"><?php echo $this->getMsg( 'createacct-helpusername' )->parse(); ?></span>
                        </label>
                        <?php echo Html::input( 'wpName', $this->data['name'], 'text', array(
                                'class' => 'mw-input loginText',
@@ -121,8 +121,8 @@ class UsercreateTemplateVForm extends BaseTemplate {
                        $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
                }
        ?>
-               <div>
-                       <label><?php $this->msg( 'yourdomainname' ); ?></label>
+               <div id="mw-user-domain-section">
+                       <label for="wpDomain"><?php $this->msg( 'yourdomainname' ); ?></label>
                        <div class="mw-input">
                                <select name="wpDomain" value="<?php $this->text( 'domain' ); ?>"
                                        tabindex="4">
@@ -185,9 +185,13 @@ class UsercreateTemplateVForm extends BaseTemplate {
                if ( $this->data['usereason'] ) { ?>
                        <div>
                                <label for='wpReason'><?php $this->msg( 'createacct-reason' ); ?></label>
-                               <input type='text' class='mw-input loginText' name="wpReason" id="wpReason"
-                                               tabindex="8"
-                                               value="<?php $this->text( 'reason' ); ?>" size='20' />
+                               <?php echo Html::input( 'wpReason', $this->data['reason'], 'text', array(
+                                       'class' => 'mw-input loginText',
+                                       'id' => 'wpReason',
+                                       'tabindex' => '8',
+                                       'size' => '20',
+                                       'placeholder' => $this->getMsg( 'createacct-reason-ph' )->text()
+                               ) ); ?>
                        </div>
                <?php }
                $tabIndex = 9;
@@ -204,7 +208,7 @@ class UsercreateTemplateVForm extends BaseTemplate {
                                                        id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
                                                        type="checkbox" value="1"
                                                        tabindex="<?php echo $tabIndex++; ?>"
-                                                       <?php if ( !empty( $inputItem['value'] ) )  {
+                                                       <?php if ( !empty( $inputItem['value'] ) ) {
                                                                echo 'checked="checked"';
                                                        } ?>
                                                >
@@ -251,7 +255,7 @@ class UsercreateTemplateVForm extends BaseTemplate {
                <div class="mw-submit">
                        <input type='submit' class="mw-ui-button mw-ui-big mw-ui-block mw-ui-primary" name="wpCreateaccount" id="wpCreateaccount"
                                tabindex="<?php echo $tabIndex++; ?>"
-                               value="<?php $this->msg( 'createaccount' ); ?>" />
+                               value="<?php $this->msg( 'createacct-submit' ); ?>" />
                </div>
        <input type="hidden" id="useNew" name="useNew" value="1" />
 <?php if ( $this->haveData( 'uselang' ) ) { ?><input type="hidden" name="uselang" value="<?php $this->text( 'uselang' ); ?>" /><?php } ?>
@@ -261,27 +265,18 @@ class UsercreateTemplateVForm extends BaseTemplate {
 <div class="mw-createacct-benefits-container">
        <h2><?php $this->msg( 'createacct-benefit-heading' ); ?></h2>
        <div class="mw-createacct-benefits-list">
-               <div>
-                       <div class="mw-benefits-icon <?php $this->msg( 'createacct-benefit-icon1' ); ?>"></div>
-                       <div class="mw-number-text">
-                               <h3><?php $this->msg( 'createacct-benefit-head1' ); ?></h3>
-                               <p><?php $this->msg( 'createacct-benefit-body1' ); ?></p>
-                       </div>
-               </div>
-               <div>
-                       <div class="mw-benefits-icon <?php $this->msg( 'createacct-benefit-icon2' ); ?>"></div>
-                       <div class="mw-number-text">
-                               <h3><?php $this->msg( 'createacct-benefit-head2' ); ?></h3>
-                               <p><?php $this->msg( 'createacct-benefit-body2' ); ?></p>
-                       </div>
-               </div>
-               <div>
-                       <div class="mw-benefits-icon <?php $this->msg( 'createacct-benefit-icon3' ); ?>"></div>
-                       <div class="mw-number-text">
-                               <h3><?php $this->msg( 'createacct-benefit-head3' ); ?></h3>
-                               <p><?php $this->msg( 'createacct-benefit-body3' ); ?></p>
-                       </div>
+       <?php
+       for ( $benefitIdx = 1; $benefitIdx <= $this->data['benefitCount']; $benefitIdx++ ) {
+               // Pass each benefit's head text (by default a number) as a parameter to the body's message for PLURAL handling.
+               $headUnescaped = $this->getMsg( "createacct-benefit-head$benefitIdx" )->text();
+       ?>
+               <div class="mw-number-text <?php $this->msg( "createacct-benefit-icon$benefitIdx" ); ?>">
+                       <h3><?php $this->msg( "createacct-benefit-head$benefitIdx" ); ?></h3>
+                       <p><?php echo $this->getMsg( "createacct-benefit-body$benefitIdx" )->params( $headUnescaped )->escaped(); ?></p>
                </div>
+       <?php
+       }
+       ?>
        </div>
 </div>
 </div>