small tweaks
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Sep 2005 16:30:28 +0000 (16:30 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 23 Sep 2005 16:30:28 +0000 (16:30 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1865 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/reporter/templates/login.ttk
Open-ILS/src/reporter/templates/logout.ttk

index f196330..82f6e2d 100644 (file)
@@ -2,14 +2,20 @@
 
        [% INCLUDE header.ttk title="Login" %]
 
-       <body>
+       <body onload='initPage();'>
 
                <script language='javascript'>
 
                        var COOKIE_SES = "ses";
                        var cookie = new cookieObject("ses", 1, "/", COOKIE_SES);
 
-                       function checkInputClicks() {
+                       function initPage() {
+                       document.getElementById("reports_login_username").onkeypress = checkInputClicks;
+                       document.getElementById("reports_login_password").onkeypress = checkInputClicks;
+                       }
+
+                       function checkInputClicks(evt) {
+                               if(userPressedEnter(evt)) doLogin();
                        }
 
 
@@ -44,7 +50,7 @@
        
                                cookie.put(COOKIE_SES, auth_result);
                                cookie.write();
-                               location.href = "stage1";
+                               location.href = location.href;
                
                        }
 
                <table style='padding: 4px; border: 2px solid #E0E0E0;'>
                        <tr>
                                <td >Username: </td>
-                               <td ><input type='text'  id='reports_login_username'/></td>
+                               <td ><input type='text' id='reports_login_username'/></td>
                        </tr>
                        <tr>
                                <td >Password: </td>
-                               <td ><input type='password'  id='reports_login_password'/></td>
+                               <td ><input type='password' id='reports_login_password'/></td>
                        <tr>
                        </tr>
                                <td><input type='submit' value='Login' onclick='doLogin();'/></td>
@@ -72,3 +78,5 @@
 </html>
 
 
+
+
index f325b74..d0b1989 100644 (file)
@@ -16,7 +16,7 @@
 
    cookie.remove(COOKIE_SES);
 
-       location.href="login";
+       location.href = location.href.replace( /\w+\/?$/, "" );
 
 }