Hi guys,

Who is the manager of LoginKit? I have some corretions to be filtered
and, if you agree, be applyed:

First: I change the simpleLoginForm identation (the html source) to be
easier to read the source. It will be usefull when someone want to
extend the usercomponent... There is an attached patch...

There is some more points to note, what does happen when the password
is not validated/wrong? Should the simpleLoginForm have an error
message?

I done a test of the permittedRoles method, it is not working, I will
try to fix it...
I suggest to separate the method userExists from passwordCorrect,

today the hierarchy is:
- loginCorrect
  - passwordCorrect
    - userExists

I propose to be:
- loginCorrect
  - userExists
  - passwordCorrect

Do you undestand or agree?

thanks...

-- 
Michel Thadeu Sabchuk
Curitiba - Brasil
Index: usercomponent.py
===================================================================
--- usercomponent.py    (revisão 2363)
+++ usercomponent.py    (cópia de trabalho)
@@ -192,18 +192,24 @@
         username = req.field('_actionLoginUsername_', '')
         if not username:
             username = req.cookie('defaultUsername', '')
-        return '''<form action="" method="POST" name="_loginForm_">
-<table class="loginForm"><tr><td>Username:</td>
-<td><input type="text" name="_actionLoginUsername_" value="%s" 
size=20></td></tr>
-<tr><td>Password:</td>
-<td><input type="password" name="_actionLoginPassword_" size=20></td></tr>
-<tr><td colspan=2 align=center><input type="submit" value="Login"></td></tr>
-</table></form>
-<script language="JavaScript"><!--
-document.forms._loginForm_.elements.%s.focus()
-//--></script>''' % \
-    (htmlEncode(username),
-     username and '_actionLoginPassword_' or '_actionLoginUsername_')
+        return '''\
+<form action="" method="POST" name="_loginForm_">
+<table class="loginForm">
+<tr>
+    <td>Username:</td>
+    <td><input type="text" name="_actionLoginUsername_" value="%s" 
size=20></td>
+</tr>
+<tr>
+    <td>Password:</td>
+    <td><input type="password" name="_actionLoginPassword_" size=20></td>
+</tr>
+<tr>
+    <td colspan=2 align=center><input type="submit" value="Login"></td>
+</tr>
+</table>
+</form>
+<script language="JavaScript"><!-- 
document.forms._loginForm_.elements.%s.focus() //--></script>
+''' % (htmlEncode(username), username and '_actionLoginPassword_' or 
'_actionLoginUsername_')
      
 
     def user(self):

Reply via email to