summaryrefslogtreecommitdiff
path: root/UI/login.js
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-30 08:21:03 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-11-30 08:21:03 +0000
commita581e9f50c6a4a22c8fbfd24348cd40835784d44 (patch)
tree30b65d843ea3f1cf9121e809832256673a481239 /UI/login.js
parent6935413a1b883aceb9bb6906b653ca77990c5439 (diff)
Using login.html to test new header framework.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1927 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'UI/login.js')
-rw-r--r--UI/login.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/UI/login.js b/UI/login.js
index 5f5eed63..7756788c 100644
--- a/UI/login.js
+++ b/UI/login.js
@@ -36,3 +36,45 @@ function check_auth() {
username, password
);
}
+
+function setup_page(login_label, password_label) {
+ var credential_html;
+
+ var cred_div = document.getElementById("credentials");
+ credential_html =
+ '<div class="labelledinput">' +
+ '<div class="label">' +
+ '<label for="login">' +
+ login_label+
+ "</label>" +
+ '</div>' +
+ '<div class="input">' +
+ '<input class="login" ' +
+ 'name="login" size="30" ' +
+ 'value="" id="login" '+
+ 'accesskey="n" />' +
+ '</div>' +
+ '</div>' +
+ '<div class="labelledinput">' +
+ '<div class="label">' +
+ '<label for="password">' +
+ password_label +
+ '</label>' +
+ '</div>' +
+ '<div class="input">' +
+ '<input class="login" ' +
+ 'type="password" ' +
+ 'name="password" ' +
+ 'size="30" ' +
+ 'id="password" ' +
+ 'accesskey="p" />' +
+ '</div>' +
+ '</div>';
+ if (!document.login.blacklisted.value && get_http_request_object()){
+ cred_div.innerHTML = credential_html;
+ document.login.login.focus();
+ }
+ else {
+ document.login.company.focus();
+ }
+}