]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-7861 xhtml strict fixes for login page
authorskodak <skodak>
Thu, 4 Jan 2007 23:27:19 +0000 (23:27 +0000)
committerskodak <skodak>
Thu, 4 Jan 2007 23:27:19 +0000 (23:27 +0000)
lib/weblib.php
login/index.php
login/index_form.html

index a4e026bf556a69e612cfa1839f18b0c9997c6c1b..5e61aa0cb0f02e124e0a73627cbdc2c7f09fb0b7 100644 (file)
@@ -1062,7 +1062,7 @@ function popup_form($common, $options, $formid, $selected='', $nothing='choose',
 function formerr($error) {
 
     if (!empty($error)) {
-        echo '<font color="#ff0000">'. $error .'</font>';
+        echo '<span class="error">'. $error .'</span>';
     }
 }
 
index 32fa626bab90d28ffb8ee3c4d03ba5762d091c1f..459830ab027d6e51ea1239c77b022a351d719a00 100644 (file)
@@ -226,7 +226,7 @@ if ($authsequence[0] == 'cas' and !empty($CFG->cas_enabled)) {
 
             // TODO: if the user failed to authenticate, check if the username corresponds to a remote mnet user
             if ($users = get_records('user', 'username', $frm->username)) {
-                $errormsg .= "<br>If you are a Moodle Network remote user and can <a href=\"mnet_email.php?u=$frm->username\">confirm your email address here</a>, you can be redirected to your login page.<br>";
+                $errormsg .= "<br/>If you are a Moodle Network remote user and can <a href=\"mnet_email.php?u=$frm->username\">confirm your email address here</a>, you can be redirected to your login page.<br/>";
             }
         }
     }
index afec42af64a7e9ed6de36fe6af5d9e0dee08ac41..1c30b1d4df6ed31e31686c922b0d65ded24045a8 100644 (file)
@@ -1,17 +1,26 @@
-<table width="90%" border="0" cellpadding="5" align="center" class="loginbox">
+<?php
+if ($show_instructions) {
+    $mainwidth = '90%';
+    $leftwidth = '50%';
+} else {
+    $mainwidth = '40%';
+    $leftwidth = '100%';
+}
+?>
+<table width="<?php echo $mainwidth ?>" border="0" cellpadding="5" style="margin-left:auto;margin-right:auto" class="loginbox" summary="">
 <?php if ($show_instructions) { ?>
   <tr>
-    <th width="50%" class="header left" scope="col">
+    <th style="width:50%" class="header left" scope="col">
       <?php  print_string("returningtosite") ?>
     </th>
-    <th width="50%" class="header right" scope="col">
+    <th style="width:50%" class="header right" scope="col">
       <?php  print_string("firsttime") ?>
     </th>
   </tr>
 <?php } ?>
   <tr>
-    <td width="50%" align="center" valign="top" class="content left">
-      <p><?php print_string("loginusing") ?>:
+    <td style="width:<?php echo $leftwidth ?>" valign="top" class="content left">
+      <div style="text-align:center"><?php print_string("loginusing") ?>:
         <?php
         if (empty($CFG->usesid))
         {
             echo ")";
             helpbutton("cookies", get_string("cookiesenabled"));
         }
-        ?><br /><?php formerr($errormsg) ?>
-      </p>
+        ?><div><?php formerr($errormsg) ?></div>
+      </div>
       <form action="index.php" method="post" id="login">
-        <table border="0" align="center">
+        <table border="0" style="margin-left:auto;margin-right:auto" summary="">
         <tr>
-          <td width="80%">
-            <table align="center" class="loginform">
+          <td style="width:80%">
+            <table style="margin-left:auto;margin-right:auto" class="loginform" summary="">
               <tr class="username"> 
-                <td align="right" class="c0">
+                <td style="text-align:right" class="c0">
                   <label for="username"><?php print_string("username") ?></label>
                 </td>
                 <td class="c1">
@@ -36,7 +45,7 @@
                 </td>
               </tr>
               <tr class="password"> 
-                <td align="right" class="c0">
+                <td style="text-align:right" class="c0">
                   <label for="password"><?php print_string("password") ?></label>
                 </td>
                 <td class="c1">
@@ -45,7 +54,7 @@
               </tr>
             </table>
           </td>
-          <td width="20%">
+          <td style="width:20%">
             <input type="submit" value="<?php print_string("login") ?>" />
             <input type="hidden" name="testcookies" value="1" />
           </td>
@@ -54,8 +63,8 @@
       </form>
 
 <?php if ($CFG->guestloginbutton) {  ?>
-      <hr width="80%" />
-      <p><?php print_string("someallowguest") ?>:</p>
+      <hr style="width:80%" />
+      <div style="text-align:center"><?php print_string("someallowguest") ?>:
         <form action="index.php" method="post" id="guestlogin">
          <div>
           <input type="hidden" name="username" value="guest" />
           <input type="submit" value="<?php print_string("loginguest") ?>" />
          </div>
         </form>
+      </div>
 <?php } ?>
 
 <?php
     $changebuttonname = get_string("passwordrecovery");
     $sesskey = sesskey();
 ?>
-      <hr width="80%" />
-      <p><?php print_string("forgotten") ?></p
+      <hr style="width:80%" />
+      <div style="text-align:center"><?php print_string("forgotten") ?
         <form action="forgot_password.php" method="post" id="changepassword">
          <div>
           <input type="hidden" name="sesskey" value="<?php echo $sesskey; ?>" />
           <input type="submit" value="<?php p($changebuttonname) ?>" />
          </div>
         </form>
+      </div>
     </td>
 
 <?php if ($show_instructions) { ?>
-    <td width="50%" valign="top" class="content right">
+    <td style="width:50%" valign="top" class="content right">
 <?php     switch ($authsequence[0]) {
               case "email":
                  print_string("loginsteps", "", "signup.php");
     </td>
 <?php } ?>
 </tr>
-</table>
-</div>
\ No newline at end of file
+</table>
\ No newline at end of file