Merge "Show minor edits and tags in Special:Undelete"
[lhc/web/wiklou.git] / includes / templates / Usercreate.php
index 7a4b9f2..2f569d9 100644 (file)
@@ -113,17 +113,16 @@ class UsercreateTemplate extends BaseTemplate {
 
                        <?php
                        if ( $this->data['usedomain'] ) {
-                               $doms = "";
+                               $select = new XmlSelect( 'wpDomain', false, $this->data['domain'] );
+                               $select->setAttribute( 'tabindex', 4 );
                                foreach ( $this->data['domainnames'] as $dom ) {
-                                       $doms .= "<option>" . htmlspecialchars( $dom ) . "</option>";
+                                       $select->addOption( $dom );
                                }
                        ?>
                                <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">
-                                                       <?php echo $doms ?>
-                                               </select>
+                                               <?php echo $select->getHTML(); ?>
                                        </div>
                                </div>
                        <?php } ?>
@@ -158,9 +157,10 @@ class UsercreateTemplate extends BaseTemplate {
                                                        'id' => 'wpEmail',
                                                        'tabindex' => '6',
                                                        'size' => '20',
+                                                       'required' => $this->data['emailrequired'],
                                                        'placeholder' => $this->getMsg( $this->data['loggedin'] ?
                                                                'createacct-another-email-ph' : 'createacct-email-ph' )->text()
-                                               ) + ( $this->data['emailrequired'] ? array() : array( 'required' => '' ) ) );
+                                               ) );
                                        ?>
                                <?php } ?>
                        </div>