Disallow realname = username in GUI
authorMichael Spang <mspang@csclub.uwaterloo.ca>
Thu, 6 Aug 2009 05:41:02 +0000 (01:41 -0400)
committerMichael Spang <mspang@csclub.uwaterloo.ca>
Thu, 6 Aug 2009 05:41:02 +0000 (01:41 -0400)
ceo/urwid/newmember.py

index bceda94..c41d808 100644 (file)
@@ -73,6 +73,10 @@ class InfoPage(WizardPanel):
             self.focus_widget( self.name )
             set_status("Name is too short")
             return True
+        elif self.state['userid'] == self.state['name']:
+            self.focus_widget(self.name)
+            set_status("Name matches username")
+            return True
         clear_status()
 
 class ClubInfoPage(WizardPanel):
@@ -97,6 +101,10 @@ class ClubInfoPage(WizardPanel):
             self.focus_widget( self.name )
             set_status("Name is too short")
             return True
+        elif self.state['userid'] == self.state['name']:
+            self.focus_widget(self.name)
+            set_status("Name matches username")
+            return True
         clear_status()
 
 class SignPage(WizardPanel):