Make Special:UserLogin form use mw-ui-checkbox
authorjdlrobson <jdlrobson@gmail.com>
Fri, 25 Jul 2014 23:43:36 +0000 (16:43 -0700)
committerJdlrobson <jrobson@wikimedia.org>
Thu, 14 Aug 2014 18:31:41 +0000 (18:31 +0000)
Change-Id: Ib585e32463765d7eb7d0be5dae54dc828ddd4ca9

includes/specials/SpecialUserlogin.php
includes/templates/Usercreate.php
includes/templates/Userlogin.php

index 997d983..f4c1589 100644 (file)
@@ -1278,6 +1278,7 @@ class LoginForm extends SpecialPage {
                $out->addModuleStyles( array(
                        'mediawiki.ui',
                        'mediawiki.ui.button',
+                       'mediawiki.ui.checkbox',
                        'mediawiki.ui.input',
                        'mediawiki.special.userlogin.common.styles'
                ) );
index f1e7065..01da0bd 100644 (file)
@@ -94,14 +94,15 @@ class UsercreateTemplate extends BaseTemplate {
 
                        <div class="mw-ui-vform-field">
                                <?php if ( $this->data['createemail'] ) { ?>
-                                       <label class="mw-ui-checkbox-label">
+                                       <div class="mw-ui-checkbox">
                                                <input name="wpCreateaccountMail" type="checkbox" value="1" id="wpCreateaccountMail" tabindex="2"
                                                        <?php if ( $this->data['createemailset'] ) {
                                                                echo 'checked="checked"';
                                                        } ?>
-                                               >
-                                               <?php $this->msg( 'createaccountmail' ); ?>
-                                       </label>
+                                               ><label for="wpCreateaccountMail">
+                                                       <?php $this->msg( 'createaccountmail' ); ?>
+                                               </label>
+                                       </div>
                                <?php } ?>
                        </div>
 
@@ -207,7 +208,7 @@ class UsercreateTemplate extends BaseTemplate {
                                                // If it's a checkbox, output the whole thing (assume it has a msg).
                                                if ( $inputItem['type'] == 'checkbox' ) {
                                                ?>
-                                                       <label class="mw-ui-checkbox-label">
+                                                       <div class="mw-ui-checkbox">
                                                                <input
                                                                        name="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
                                                                        id="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"
@@ -216,9 +217,8 @@ class UsercreateTemplate extends BaseTemplate {
                                                                        <?php if ( !empty( $inputItem['value'] ) ) {
                                                                                echo 'checked="checked"';
                                                                        } ?>
-                                                               >
-                                                               <?php $this->msgHtml( $inputItem['msg'] ); ?>
-                                                       </label>
+                                                               ><label for="<?php echo htmlspecialchars( $inputItem['name'] ); ?>"></label>
+                                                       </div><?php $this->msgHtml( $inputItem['msg'] ); ?>
                                                <?php
                                                } else {
                                                        // Not a checkbox.
index 7187e8c..8bba426 100644 (file)
@@ -135,14 +135,14 @@ class UserloginTemplate extends BaseTemplate {
 
                        <div class="mw-ui-vform-field">
                                <?php if ( $this->data['canremember'] ) { ?>
-                                       <label class="mw-ui-checkbox-label">
+                                       <div class="mw-ui-checkbox">
                                                <input name="wpRemember" type="checkbox" value="1" id="wpRemember" tabindex="4"
                                                        <?php if ( $this->data['remember'] ) {
                                                                echo 'checked="checked"';
                                                        } ?>
-                                               >
-                                               <?php echo $this->getMsg( 'userlogin-remembermypassword' )->numParams( $expirationDays )->escaped(); ?>
-                                       </label>
+                                               ><label for="wpRemember">
+                                                       <?php echo $this->getMsg( 'userlogin-remembermypassword' )->numParams( $expirationDays )->escaped(); ?></label>
+                                       </div>
                                <?php } ?>
                        </div>