Mercurial > libervia-backend
comparison sat.tac @ 23:925ab466c5ec
better presentation for register new account
- error message when no user, pass or server given
- server is now automatically updated when jid change in connection category
author | Goffi <goffi@goffi.org> |
---|---|
date | Tue, 01 Dec 2009 06:07:20 +0100 |
parents | bb72c29f3432 |
children | 53e921c8a357 |
comparison
equal
deleted
inserted
replaced
22:bb72c29f3432 | 23:925ab466c5ec |
---|---|
382 | 382 |
383 return next_id | 383 return next_id |
384 | 384 |
385 def registerNewAccountCB(self, id, data): | 385 def registerNewAccountCB(self, id, data): |
386 user = jid.parse(self.memory.getParamA("JabberID", "Connection"))[0] | 386 user = jid.parse(self.memory.getParamA("JabberID", "Connection"))[0] |
387 password = self.memory.getParamA("Password", "Connection") | |
387 server = self.memory.getParamA("Server", "Connection") | 388 server = self.memory.getParamA("Server", "Connection") |
389 | |
390 if not user or not password or not server: | |
391 info ('No user or server given') | |
392 #TODO: a proper error message must be sent to frontend | |
393 self.actionResult(id, "ERROR", {'message':"No user, password or server given, can't register new account."}) | |
394 return | |
388 | 395 |
389 confirm_id = sat_next_id() | 396 confirm_id = sat_next_id() |
390 self.__private_data[confirm_id]=id | 397 self.__private_data[confirm_id]=id |
391 | 398 |
392 self.askConfirmation(confirm_id, "YES/NO", | 399 self.askConfirmation(confirm_id, "YES/NO", |