Add username autocomplete to library
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 23 Jan 2009 05:47:36 +0000 (00:47 -0500)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Fri, 23 Jan 2009 05:47:36 +0000 (00:47 -0500)
ceo/urwid/library.py

index 9761aaf..f6252eb 100644 (file)
@@ -112,7 +112,7 @@ class CheckoutPage(WizardPanel):
         """
         self.state["user"] = "ERROR"
         self.state["task"] = "sign_out"
         """
         self.state["user"] = "ERROR"
         self.state["task"] = "sign_out"
-        self.user = SingleEdit("Username: ")
+        self.user = LdapWordEdit(csclub_uri, csclub_base, 'uid', "Username: ")
         
         self.widgets = [
             urwid.Text("Book Checkout"),
         
         self.widgets = [
             urwid.Text("Book Checkout"),
@@ -138,7 +138,7 @@ class ConfirmPage(WizardPanel):
 
         task -> used to deterimine the action
         """
 
         task -> used to deterimine the action
         """
-        self.user = urwid.Text("Username: ")
+        self.user = LdapWordEdit(csclub_uri, csclub_base, 'uid', "Username: ")
         self.book = urwid.Text("Book: ")
 
         title = ""
         self.book = urwid.Text("Book: ")
 
         title = ""
@@ -232,7 +232,7 @@ class CheckinPage(WizardPanel):
         self.state["book"] = None
         self.state["user"] = "ERROR"
         self.state["task"] = "sign_in"
         self.state["book"] = None
         self.state["user"] = "ERROR"
         self.state["task"] = "sign_in"
-        self.user = SingleEdit("Username: ")
+        self.user = LdapWordEdit(csclub_uri, csclub_base, 'uid', "Username: ")
         
         self.widgets = [
             urwid.Text("Book Checkin"),
         
         self.widgets = [
             urwid.Text("Book Checkin"),