Moved inline markup in signup and login forms to CSS, and dealt with some of the...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 9 Sep 2007 23:58:10 +0000 (23:58 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Sun, 9 Sep 2007 23:58:10 +0000 (23:58 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/templates/Userlogin.php
skins/common/shared.css

index b0db547..a5c9eae 100644 (file)
@@ -30,6 +30,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   ImageMagick, diff3 et al. during installation [patch by Jan Reininghaus]
 * (bug 7027) Shift handling of deletion permissions-checking to
   getUserPermissionsErrors.
+* Login and signup forms are now more correct for right-to-left languages.
 
 === API changes in 1.12 ===
 
index b736039..b83b5cf 100644 (file)
@@ -1214,7 +1214,7 @@ $wgCacheEpoch = '20030516000000';
  * to ensure that client-side caches don't keep obsolete copies of global
  * styles.
  */
-$wgStyleVersion = '97';
+$wgStyleVersion = '98';
 
 
 # Server-side caching:
index 127c30a..5b41ba7 100644 (file)
@@ -33,16 +33,16 @@ class UserloginTemplate extends QuickTemplate {
        <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
        <table>
                <tr>
-                       <td align='right'><label for='wpName1'><?php $this->msg('yourname') ?></label></td>
-                       <td align='left'>
+                       <td class="mw-label"><label for='wpName1'><?php $this->msg('yourname') ?></label></td>
+                       <td class="mw-input">
                                <input type='text' class='loginText' name="wpName" id="wpName1"
                                        tabindex="1"
                                        value="<?php $this->text('name') ?>" size='20' />
                        </td>
                </tr>
                <tr>
-                       <td align='right'><label for='wpPassword1'><?php $this->msg('yourpassword') ?></label></td>
-                       <td align='left'>
+                       <td class="mw-label"><label for='wpPassword1'><?php $this->msg('yourpassword') ?></label></td>
+                       <td class="mw-input">
                                <input type='password' class='loginPassword' name="wpPassword" id="wpPassword1"
                                        tabindex="2"
                                        value="" size='20' />
@@ -55,8 +55,8 @@ class UserloginTemplate extends QuickTemplate {
                }
        ?>
                <tr>
-                       <td align='right'><?php $this->msg( 'yourdomainname' ) ?></td>
-                       <td align='left'>
+                       <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
+                       <td class="mw-input">
                                <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
                                        tabindex="3">
                                        <?php echo $doms ?>
@@ -66,7 +66,7 @@ class UserloginTemplate extends QuickTemplate {
        <?php } ?>
                <tr>
                        <td></td>
-                       <td align='left'>
+                       <td class="mw-input">
                                <input type='checkbox' name="wpRemember"
                                        tabindex="4"
                                        value="1" id="wpRemember"
@@ -76,7 +76,7 @@ class UserloginTemplate extends QuickTemplate {
                </tr>
                <tr>
                        <td></td>
-                       <td align='left' style="white-space:nowrap">
+                       <td class="mw-submit">
                                <input type='submit' name="wpLoginattempt" id="wpLoginattempt" tabindex="5" value="<?php $this->msg('login') ?>" />&nbsp;<?php if( $this->data['useemail'] && $this->data['canreset']) { ?><input type='submit' name="wpMailmypassword" id="wpMailmypassword"
                                        tabindex="6"
                                                                        value="<?php $this->msg('mailmypassword') ?>" />
@@ -117,16 +117,16 @@ class UsercreateTemplate extends QuickTemplate {
        <?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
        <table>
                <tr>
-                       <td align='right'><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
-                       <td align='left'>
+                       <td class="mw-label"><label for='wpName2'><?php $this->msg('yourname') ?></label></td>
+                       <td class="mw-input">
                                <input type='text' class='loginText' name="wpName" id="wpName2"
                                        tabindex="1"
                                        value="<?php $this->text('name') ?>" size='20' />
                        </td>
                </tr>
                <tr>
-                       <td align='right'><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
-                       <td align='left'>
+                       <td class="mw-label"><label for='wpPassword2'><?php $this->msg('yourpassword') ?></label></td>
+                       <td class="mw-input">
                                <input type='password' class='loginPassword' name="wpPassword" id="wpPassword2"
                                        tabindex="2"
                                        value="" size='20' />
@@ -139,8 +139,8 @@ class UsercreateTemplate extends QuickTemplate {
                }
        ?>
                <tr>
-                       <td align='right'><?php $this->msg( 'yourdomainname' ) ?></td>
-                       <td align='left'>
+                       <td class="mw-label"><?php $this->msg( 'yourdomainname' ) ?></td>
+                       <td class="mw-input">
                                <select name="wpDomain" value="<?php $this->text( 'domain' ) ?>"
                                        tabindex="3">
                                        <?php echo $doms ?>
@@ -149,8 +149,8 @@ class UsercreateTemplate extends QuickTemplate {
                </tr>
        <?php } ?>
                <tr>
-                       <td align='right'><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
-                       <td align='left'>
+                       <td class="mw-label"><label for='wpRetype'><?php $this->msg('yourpasswordagain') ?></label></td>
+                       <td class="mw-input">
                                <input type='password' class='loginPassword' name="wpRetype" id="wpRetype"
                                        tabindex="4"
                                        value=""
@@ -159,8 +159,8 @@ class UsercreateTemplate extends QuickTemplate {
                </tr>
                <tr>
                        <?php if( $this->data['useemail'] ) { ?>
-                               <td align='right' style='vertical-align: top'><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
-                               <td align='left'>
+                               <td class="mw-label"><label for='wpEmail'><?php $this->msg('youremail') ?></label></td>
+                               <td class="mw-input">
                                        <input type='text' class='loginText' name="wpEmail" id="wpEmail"
                                                tabindex="5"
                                                value="<?php $this->text('email') ?>" size='20' />
@@ -172,8 +172,8 @@ class UsercreateTemplate extends QuickTemplate {
                        <?php if( $this->data['userealname'] ) { ?>
                                </tr>
                                <tr>
-                                       <td align='right' style='vertical-align: top'><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
-                                       <td align='left'>
+                                       <td class="mw-label"><label for='wpRealName'><?php $this->msg('yourrealname') ?></label></td>
+                                       <td class="mw-input">
                                                <input type='text' class='loginText' name="wpRealName" id="wpRealName"
                                                        tabindex="6"
                                                        value="<?php $this->text('realname') ?>" size='20' />
@@ -185,7 +185,7 @@ class UsercreateTemplate extends QuickTemplate {
                </tr>
                <tr>
                        <td></td>
-                       <td align='left'>
+                       <td class="mw-input">
                                <input type='checkbox' name="wpRemember"
                                        tabindex="7"
                                        value="1" id="wpRemember"
@@ -195,7 +195,7 @@ class UsercreateTemplate extends QuickTemplate {
                </tr>
                <tr>
                        <td></td>
-                       <td align='left'>
+                       <td class="mw-submit">
                                <input type='submit' name="wpCreateaccount" id="wpCreateaccount"
                                        tabindex="8"
                                        value="<?php $this->msg('createaccount') ?>" />
index f6d63ab..61f6839 100644 (file)
@@ -46,3 +46,16 @@ table.filehistory td.mw-imagepage-filesize,
 table.filehistory th.mw-imagepage-filesize {
        white-space:nowrap;
 }
+
+/**
+ * Forms
+ */
+body.ltr td.mw-label { text-align: right; }
+body.ltr td.mw-input { text-align: left; }
+body.ltr td.mw-submit { text-align: left; }
+body.rtl td.mw-label { text-align: left; }
+body.rtl td.mw-input { text-align: right; }
+body.rtl td.mw-submit { text-align: right; }
+
+td.mw-label { vertical-align: top; }
+td.mw-submit { white-space: nowrap; }