xhtml
authorx2000habouzit <x2000habouzit>
Wed, 25 Aug 2004 09:33:30 +0000 (09:33 +0000)
committerx2000habouzit <x2000habouzit>
Wed, 25 Aug 2004 09:33:30 +0000 (09:33 +0000)
htdocs/javascript/do_challenge_response.js
templates/password_prompt.tpl
templates/password_prompt_logged.head.tpl
templates/password_prompt_logged.tpl

index 82e528e..47b6be0 100644 (file)
@@ -1,10 +1,10 @@
 function doChallengeResponse() {
-    str = document.login.username.value + ":" +
-        MD5(document.login.password.value) + ":" +
-        document.loginsub.challenge.value;
+    str = document.forms.login.username.value + ":" +
+        MD5(document.forms.login.password.value) + ":" +
+        document.forms.loginsub.challenge.value;
 
-    document.loginsub.response.value = MD5(str);
-    document.loginsub.username.value = document.login.username.value;
-    document.login.password.value = "";
-    document.loginsub.submit();
+    document.forms.loginsub.response.value = MD5(str);
+    document.forms.loginsub.username.value = document.forms.login.username.value;
+    document.forms.login.password.value = "";
+    document.forms.loginsub.submit();
 }
index 555a92c..f7eae66 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: password_prompt.tpl,v 1.15 2004-08-24 22:57:20 x2000habouzit Exp $ *}
+{* $Id: password_prompt.tpl,v 1.16 2004-08-25 09:33:30 x2000habouzit Exp $ *}
 <noscript>
   <p class="erreur">
     Ton navigateur n'accepte pas le javaScript !!
@@ -41,7 +41,7 @@ Si tu n'es pas {insert name="getName" script="insert.password.inc.php"}, change
 
 <br />
 
-<form action="{$smarty.server.REQUEST_URI}" method="post" name="login" onsubmit="doChallengeResponse(); return false;">
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" onsubmit="doChallengeResponse(); return false;">
   <table class="tinybicol" cellpadding="4" summary="Formulaire de login">
     <tr>
       <th colspan="2">Connexion</th>
@@ -89,7 +89,7 @@ Probl
 {/if}
 
 <!-- Set up the form with the challenge value and an empty reply value //-->
-<form action="{$smarty.server.REQUEST_URI}" method="post" name="loginsub">
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="loginsub">
   <div>
     <input type="hidden" name="challenge" value="{$smarty.session.session->challenge}" />
     <input type="hidden" name="response"  value="" />
@@ -102,10 +102,11 @@ Probl
 <script type="text/javascript">
   <!--
   // Activate the appropriate input form field.
-  if (document.login.username.value == '') {
-    document.login.username.focus();
-    } else {
-    document.login.password.focus();
+  login = document.getElementById('login');
+  if (document.forms.login.username.value == '') {
+    document.forms.login.username.focus();
+  } else {
+    document.forms.login.password.focus();
   }
   // -->
 </script>
index 945bd61..1433f91 100644 (file)
@@ -1,16 +1,16 @@
-{* $Id: password_prompt_logged.head.tpl,v 1.6 2004-08-24 22:57:20 x2000habouzit Exp $ *}
+{* $Id: password_prompt_logged.head.tpl,v 1.7 2004-08-25 09:33:30 x2000habouzit Exp $ *}
 
     <script src="{"javascript/md5.js"|url}" type="text/javascript"></script>
     <script type="text/javascript">//<![PCDATA[
       <!--
       function doChallengeResponse() {ldelim}
         str = "{$smarty.cookies.ORGlogin}:" +
-        MD5(document.login.password.value) + ":" +
-        document.loginsub.challenge.value;
+        MD5(document.forms.login.password.value) + ":" +
+        document.forms.loginsub.challenge.value;
 
-        document.loginsub.response.value = MD5(str);
-        document.login.password.value = "";
-        document.loginsub.submit();
+        document.forms.loginsub.response.value = MD5(str);
+        document.forms.login.password.value = "";
+        document.forms.loginsub.submit();
       {rdelim}
       //]]>
     </script>
index c29e7b1..4fb6489 100644 (file)
@@ -1,4 +1,4 @@
-{* $Id: password_prompt_logged.tpl,v 1.10 2004-02-12 02:03:08 x2000habouzit Exp $ *}
+{* $Id: password_prompt_logged.tpl,v 1.11 2004-08-25 09:33:30 x2000habouzit Exp $ *}
 
 <div class="center">
   <table summary="Accès sécurisé" style="width: 90%;">
@@ -18,7 +18,7 @@
   </table>
 </div>
 <br /><br />
-<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" name="login" onsubmit='doChallengeResponse(); return false;'>
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="login" id="login" onsubmit='doChallengeResponse(); return false;'>
   <table class="tinybicol" cellpadding="4" summary="Formulaire de login">
     <tr>
       <td class="titre">
@@ -48,7 +48,7 @@
 {/if}
 
 <!-- Set up the form with the challenge value and an empty reply value -->
-<form action="{$smarty.server.REQUEST_URI}" method="post" name="loginsub">
+<form action="{$smarty.server.REQUEST_URI}" method="post" id="loginsub">
   <div>
     <input type="hidden" name="challenge" value="{$smarty.session.session->challenge}" />
     <input type="hidden" name="username"  value="{$smarty.cookies.ORGlogin}" />
@@ -60,7 +60,7 @@
 <script type="text/javascript">
   <!--
   // Activate the appropriate input form field.
-  document.login.password.focus();
+  document.forms.login.password.focus();
   // -->
 </script>
 {/literal}