incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r673037 - /incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/LoginServlet.java
Date Tue, 01 Jul 2008 09:36:12 GMT
Author: cziegeler
Date: Tue Jul  1 02:36:11 2008
New Revision: 673037

URL: http://svn.apache.org/viewvc?rev=673037&view=rev
Log:
Use real submit button for login.

Modified:
    incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/LoginServlet.java

Modified: incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/LoginServlet.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/LoginServlet.java?rev=673037&r1=673036&r2=673037&view=diff
==============================================================================
--- incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/LoginServlet.java
(original)
+++ incubator/sling/trunk/extensions/httpauth/src/main/java/org/apache/sling/httpauth/impl/LoginServlet.java
Tue Jul  1 02:36:11 2008
@@ -27,7 +27,7 @@
 
 /**
  * The <code>LoginServlet</code> TODO
- * 
+ *
  * @scr.component metatype="no"
  * @scr.service interface="javax.servlet.Servlet"
  * @scr.property name="service.description" value="HTTP Header Login Servlet"
@@ -76,15 +76,16 @@
         pw.println("    var pass = document.forms['login'].pwd.value;");
         pw.println("    sendRequest(user, pass);");
         pw.println("    document.location = document.location");
+        pw.println("    return false;");
         pw.println("}");
         pw.println("</script>");
 
-        pw.println("<form name='login'>");
+        pw.println("<form name='login' onsubmit='return loginuser()'>");
         pw.println("<table align='center'>");
         pw.println("<tr><td colspan='2' align='center'>You are not currently
logged in</td></tr>");
         pw.println("<tr><td>Name</td><td><input type='text' name='usr'
/></td></tr>");
         pw.println("<tr><td>Password</td><td><input type='text'
name='pwd' /></td></tr>");
-        pw.println("<tr><td colspan='2' align='center'><input type='button'
value='Login' onClick='loginuser();'/></td></tr>");
+        pw.println("<tr><td colspan='2' align='center'><input type='submit'
value='Login' onClick='loginuser();'/></td></tr>");
         pw.println("</table>");
         pw.println("</form>");
     }



Mime
View raw message