dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14078
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4641: eliminated need for loginfailed page for standard (mobile is wip)
------------------------------------------------------------
revno: 4641
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-09-22 09:18:09 +0200
message:
eliminated need for loginfailed page for standard (mobile is wip)
removed:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed_mobile.vm
modified:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login_mobile.vm
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LogoutAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml
dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2011-09-21 18:20:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2011-09-22 07:18:09 +0000
@@ -43,6 +43,9 @@
</table>
</form>
</div>
+ #if( $failed )
+ <span class="loginMessage">Wrong username or password. Please try again.</span>
+ #end
</div>
</body>
</html>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login_mobile.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login_mobile.vm 2011-09-21 22:05:23 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login_mobile.vm 2011-09-22 07:18:09 +0000
@@ -64,6 +64,12 @@
</form>
+#if( $failed )
+<p style="color: #eee;">
+ Wrong username or password. Please try again.
+</p>
+#end
+
</body>
</html>
=== removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.vm 2011-09-21 18:20:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed.vm 1970-01-01 00:00:00 +0000
@@ -1,47 +0,0 @@
-<!DOCTYPE HTML>
-<html>
- <head>
- <title>DHIS 2</title>
- <script type="text/javascript" src="../javascripts/jQuery/jquery.min.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#j_username').focus();
-
- $('#loginForm').bind('submit', function() {
- $('#submit').attr('disabled', 'disabled');
- $('#reset').attr('disabled', 'disabled');
- });
- });
- </script>
- <link type="text/css" rel="stylesheet" media="screen" href="../css/login.css">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- </head>
- <body>
- <div class="loginField" align="center">
- <div><img alt="" src="logo_banner.png"></div>
-
- <div style="margin-top:2%">
- <form id='loginForm' action="../../dhis-web-commons-security/login.action" method="post">
- <table>
- <tr>
- <td><label for="j_username">Username</label></td>
- <td><input type="text" id="j_username" name="j_username" style="width:240px; height:20px;"></td>
- </tr>
- <tr>
- <td><label for="j_password">Password</label></td>
- <td><input type="password" id="j_password" name="j_password" style="width:240px; height:20px;"></td>
- </tr>
- <tr>
- <td></td>
- <td>
- <input id='submit' type="submit" value="Login" style="width:120px; height:26px;">
- <input id='reset' type="reset" value="Clear" style="width:120px; height:26px;">
- </td>
- </tr>
- </table>
- </form>
- </div>
- <span class="loginMessage">Wrong username or password. Please try again.</span>
- </div>
- </body>
-</html>
=== removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed_mobile.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed_mobile.vm 2011-09-21 22:05:55 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/loginfailed_mobile.vm 1970-01-01 00:00:00 +0000
@@ -1,73 +0,0 @@
-<!DOCTYPE html>
-<html>
-
-<head>
-<title>DHIS 2</title>
-
-<meta name="viewport" content="width=device-width, user-scalable=no" />
-
-<style type="text/css">
-html,body
-{
- background-color: #1d5288;
- color: white;
- font-size: 1.1em;
- font-family: verdana, sans, sans-serif;
-}
-
-input {
- font-size: 1em;
- font-family: verdana, sans, sans-serif;
- width: 96%;
-}
-
-table {
- width: 100%;
-}
-</style>
-</head>
-
-<body align="center">
-
-<div id="wrapper" align="center">
-<p>
- <img alt="" src="logo_banner.png">
-</p>
-
-<form id='loginForm' action="../../dhis-web-commons-security/login.action" method="post">
-
-<table>
- <tr>
- <td><h3>Username</h3></td>
- </tr>
- <tr>
- <td>
- <input type="text" id="j_username" name="j_username" size="9">
- </td>
- </tr>
- <tr>
- <td><h3>Password</h3></td>
- </tr>
- <tr>
- <td>
- <input type="text" id="j_password" name="j_password" size="9">
- </td>
- </tr>
- <tr>
- <td>
- <br />
- <input id='submit' type="submit" value="Login" style="width: 48%;">
- <input id='reset' type="reset" value="Clear" style="width: 48%;">
- </td>
- </tr>
-</table>
-
-</form>
-
-<p style="color: #eee;">
- Wrong username or password. Please try again.
-</p>
-
-</body>
-
-</html>
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java 2011-09-21 20:13:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LoginAction.java 2011-09-22 07:18:09 +0000
@@ -56,6 +56,18 @@
// Input & Output
// -------------------------------------------------------------------------
+ private Boolean failed = false;
+
+ public void setFailed( Boolean failed )
+ {
+ this.failed = failed;
+ }
+
+ public Boolean getFailed()
+ {
+ return failed;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LogoutAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LogoutAction.java 2011-09-21 20:13:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/security/action/LogoutAction.java 2011-09-22 07:18:09 +0000
@@ -56,6 +56,18 @@
// Input & Output
// -------------------------------------------------------------------------
+ private Boolean failed = false;
+
+ public void setFailed( Boolean failed )
+ {
+ this.failed = failed;
+ }
+
+ public Boolean getFailed()
+ {
+ return failed;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2011-09-21 18:20:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2011-09-22 07:18:09 +0000
@@ -27,7 +27,7 @@
<sec:http access-decision-manager-ref="accessDecisionManager" use-expressions="true" realm="DHIS2">
<sec:form-login default-target-url="/" always-use-default-target="false"
- login-processing-url="/dhis-web-commons-security/login.action" authentication-failure-url="/dhis-web-commons/security/loginfailed.action"
+ login-processing-url="/dhis-web-commons-security/login.action" authentication-failure-url="/dhis-web-commons/security/login.action?failed=true"
login-page="/dhis-web-commons/security/login.action" authentication-success-handler-ref="defaultAuthenticationSuccessHandler" />
<sec:http-basic />
<sec:logout logout-url="/dhis-web-commons-security/logout.action" />
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-09-21 20:13:56 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml 2011-09-22 07:18:09 +0000
@@ -114,12 +114,6 @@
<param name="onExceptionReturn">plainTextError</param>
</action>
- <action name="loginfailed" class="org.hisp.dhis.security.action.LogoutAction">
- <result name="standard" type="velocity">/dhis-web-commons/security/loginfailed.vm</result>
- <result name="mobile" type="velocity">/dhis-web-commons/security/loginfailed_mobile.vm</result>
- <param name="onExceptionReturn">plainTextError</param>
- </action>
-
</package>
<!-- Organisation Unit Selection Tree -->