dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13463
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4330: improved ajax-login (wip)
------------------------------------------------------------
revno: 4330
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-08-17 14:06:04 +0200
message:
improved ajax-login (wip)
modified:
dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
--
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-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-17 11:50:19 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js 2011-08-17 12:06:04 +0000
@@ -68,10 +68,10 @@
}
} else {
if(isHeaderMessageVisible()) {
- updateHeaderMessage( "Successfully connected with server. Please <button id='login_button'>Login</button> " )
+ updateHeaderMessage( '<form style="display: inline;"><label for="username">Username</label><input name="username" id="username" type="text" size="10"/><label for="password">Password</label><input name="password" id="password" type="password" size="10"/><button id="login_button" type="button">Login</button></form>' )
ajax_login();
} else {
- setHeaderMessage( "Successfully connected with server. Please <button id='login_button'>Login</button> " )
+ setHeaderMessage( '<form style="display: inline;"><label for="username">Username</label><input name="username" id="username" type="text" size="10"/><label for="password">Password</label><input name="password" id="password" type="password" size="10"/><button id="login_button" type="button">Login</button></form>' )
ajax_login();
}
}
@@ -90,8 +90,8 @@
function ajax_login() {
$("#login_button").bind("click", function() {
- var username = prompt("Please enter username");
- var password = prompt("Please enter password");
+ var username = $("#username").val();
+ var password = $("#password").val();
$.post("../dhis-web-commons-security/login.action", {
"j_username": username,