Check for invalid usernames in positions page
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 28 Nov 2007 00:24:53 +0000 (19:24 -0500)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 28 Nov 2007 00:24:53 +0000 (19:24 -0500)
pylib/csc/apps/urwid/positions.py

index 489be5a..5ae27a0 100644 (file)
@@ -57,6 +57,11 @@ class InfoPage(WizardPanel):
         for (position, widget) in self.position_widgets.iteritems():
             self.state['positions'][position] = \
                 self.parse(widget.get_edit_text())
+            for p in self.state['positions'][position]:
+                if members.get(p) == None:
+                    self.focus_widget(widget)
+                    set_status( "Invalid username: '%s'" % p )
+                    return True
         clear_status()
 
 class EndPage(WizardPanel):