Mercurial > libervia-web
comparison src/browser/register.py @ 464:bea9788f3170
browser and server sides: don't handle the "connectionError" signal anymore, we now use asyncConnect errback:
- TODO: allow the user to set another XMPP password with the stdui action CHANGE_XMPP_PASSWD_ID
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 23 May 2014 10:00:16 +0200 |
parents | 1a0cec9b0f1e |
children |
comparison
equal
deleted
inserted
replaced
463:b62c1cf0dbf7 | 464:bea9788f3170 |
---|---|
206 def onSubmit(self, event): | 206 def onSubmit(self, event): |
207 pass | 207 pass |
208 | 208 |
209 def onSubmitComplete(self, event): | 209 def onSubmitComplete(self, event): |
210 result = event.getResults() | 210 result = event.getResults() |
211 if result == "AUTH ERROR": | 211 if result == "PROFILE AUTH ERROR": |
212 Window.alert('Your login and/or password is incorrect. Please try again') | 212 Window.alert(_('Your login and/or password is incorrect. Please try again')) |
213 elif result == "XMPP AUTH ERROR": | |
214 # TODO: call stdui action CHANGE_XMPP_PASSWD_ID as it's done in primitivus | |
215 Window.alert(_(u'Your SàT profile has been authenticated but the associated XMPP account failed to connect. Please use another SàT frontend to set another XMPP password.')) | |
213 elif result == "LOGGED": | 216 elif result == "LOGGED": |
214 self.callback() | 217 self.callback() |
215 elif result == "SESSION_ACTIVE": | 218 elif result == "SESSION_ACTIVE": |
216 Window.alert('Session already active, this should not happen, please contact the author to fix it') | 219 Window.alert(_('Session already active, this should not happen, please contact the author to fix it')) |
217 elif result == "ALREADY EXISTS": | 220 elif result == "ALREADY EXISTS": |
218 self.register_warning_msg.setHTML('This login already exists,<br>please choose another one') | 221 self.register_warning_msg.setHTML(_('This login already exists,<br>please choose another one')) |
219 self.register_warning_msg.setVisible(True) | 222 self.register_warning_msg.setVisible(True) |
220 elif result == "INTERNAL": | 223 elif result == "INTERNAL": |
221 self.register_warning_msg.setHTML('SERVER ERROR: something went wrong during registration process, please contact the server administrator') | 224 self.register_warning_msg.setHTML(_('SERVER ERROR: something went wrong during registration process, please contact the server administrator')) |
222 self.register_warning_msg.setVisible(True) | 225 self.register_warning_msg.setVisible(True) |
223 elif result == "REGISTRATION": | 226 elif result == "REGISTRATION": |
224 self.login_warning_msg.setVisible(False) | 227 self.login_warning_msg.setVisible(False) |
225 self.register_warning_msg.setVisible(False) | 228 self.register_warning_msg.setVisible(False) |
226 self.login_box.setText(self.register_login_box.getText()) | 229 self.login_box.setText(self.register_login_box.getText()) |
228 self.register_login_box.setText('') | 231 self.register_login_box.setText('') |
229 self.register_pass_box.setText('') | 232 self.register_pass_box.setText('') |
230 self.email_box.setText('') | 233 self.email_box.setText('') |
231 self.right_side.selectTab(0) | 234 self.right_side.selectTab(0) |
232 self.login_pass_box.setFocus(True) | 235 self.login_pass_box.setFocus(True) |
233 Window.alert('An email has been sent to you with your login informations\nPlease remember that this is ONLY A TECHNICAL DEMO') | 236 Window.alert(_('An email has been sent to you with your login informations\nPlease remember that this is ONLY A TECHNICAL DEMO')) |
234 else: | 237 else: |
235 Window.alert('Submit error: %s' % result) | 238 Window.alert(_('Submit error: %s' % result)) |
236 | 239 |
237 | 240 |
238 class RegisterBox(PopupPanel): | 241 class RegisterBox(PopupPanel): |
239 | 242 |
240 def __init__(self, callback, *args, **kwargs): | 243 def __init__(self, callback, *args, **kwargs): |