Mercurial > libervia-web
comparison browser_side/register.py @ 62:12e889a683ce SàT v0.2.0
server side: misc stuff:
- fixed lot of misuse in callbacks
- chat history fixed
- a visual indicator now appear when we have message waiting from a contact
- fixed About dialog size issue in webkit
- fixed Drag'n'Drop for webkit
- defaut room to join is now libervia@conference.libervia.org
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 31 May 2011 17:06:59 +0200 |
parents | c3ee630914ba |
children | 9d8e79ac4c9c |
comparison
equal
deleted
inserted
replaced
61:80c490e6a1a7 | 62:12e889a683ce |
---|---|
115 if sender.isChecked(): | 115 if sender.isChecked(): |
116 self.changeMode("register") | 116 self.changeMode("register") |
117 else: | 117 else: |
118 self.changeMode("login") | 118 self.changeMode("login") |
119 | 119 |
120 def onLogin(self): | 120 def onLogin(self, button): |
121 self.submit() | 121 self.submit() |
122 | 122 |
123 def onRegister(self): | 123 def onRegister(self, button): |
124 print self.login_box.getText() | 124 print self.login_box.getText() |
125 if not re.match(r'^[a-z0-9_-]+$',self.login_box.getText(), re.IGNORECASE): | 125 if not re.match(r'^[a-z0-9_-]+$',self.login_box.getText(), re.IGNORECASE): |
126 self.warning_msg.setText('Invaling login, valid characters are a-z A-Z 0-9 _ -') | 126 self.warning_msg.setText('Invaling login, valid characters are a-z A-Z 0-9 _ -') |
127 self.warning_msg.setVisible(True) | 127 self.warning_msg.setVisible(True) |
128 elif not re.match(r'^.+@.+\..+', self.email_box.getText(), re.IGNORECASE): | 128 elif not re.match(r'^.+@.+\..+', self.email_box.getText(), re.IGNORECASE): |
140 result = event.getResults() | 140 result = event.getResults() |
141 if result == "AUTH ERROR": | 141 if result == "AUTH ERROR": |
142 Window.alert('You login and/or password is incorrect. Please try again') | 142 Window.alert('You login and/or password is incorrect. Please try again') |
143 elif result == "LOGGED": | 143 elif result == "LOGGED": |
144 self.callback() | 144 self.callback() |
145 elif result == "SESSION_ACTIVE": | |
146 Window.alert('Session already active, this should not happen, please contact contact the author to fix it') | |
145 elif result == "ALREADY EXISTS": | 147 elif result == "ALREADY EXISTS": |
146 self.warning_msg.setText('This login already exists, please choose an other one') | 148 self.warning_msg.setText('This login already exists, please choose an other one') |
147 self.warning_msg.setVisible(True) | 149 self.warning_msg.setVisible(True) |
148 elif result == "REGISTRATION": | 150 elif result == "REGISTRATION": |
149 self.warning_msg.setVisible(False) | 151 self.warning_msg.setVisible(False) |