3 [% INCLUDE header.ttk title="Login" %]
5 <body onload='initPage();'>
7 <script language='javascript'>
9 var COOKIE_SES = "ses";
10 var cookie = new cookieObject("ses", 1, "/", COOKIE_SES);
13 document.getElementById("reports_login_username").onkeypress = checkInputClicks;
14 document.getElementById("reports_login_password").onkeypress = checkInputClicks;
17 function checkInputClicks(evt) {
18 if(userPressedEnter(evt)) doLogin();
24 var uname = document.getElementById("reports_login_username").value;
25 var passwd = document.getElementById("reports_login_password").value;
27 var init_request = new RemoteRequest(
29 "open-ils.auth.authenticate.init", uname );
31 init_request.send(true);
32 var seed = init_request.getResultObject();
34 if( ! seed || seed == '0') {
35 alert( "Error Communicating with Authentication Server" );
39 var auth_request = new RemoteRequest(
40 "open-ils.auth", "open-ils.auth.authenticate.complete",
41 uname, hex_md5(seed + hex_md5(passwd)), "staff");
43 auth_request.send(true);
44 var auth_result = auth_request.getResultObject();
46 if(auth_result == '0' || auth_result == null || auth_result.length == 0) {
47 alert("Login failed");
51 cookie.put(COOKIE_SES, auth_result);
53 location.href = location.href;
60 <h3> Reports Login </h3>
61 <table style='padding: 4px; border: 2px solid #E0E0E0;'>
64 <td ><input type='text' id='reports_login_username'/></td>
68 <td ><input type='password' id='reports_login_password'/></td>
71 <td><input type='submit' value='Login' onclick='doLogin();'/></td>
76 <span> Org Test </span>
78 [% INCLUDE orgtree.ttk %]
82 [% INCLUDE footer.ttk %]