comparison src/browser/sat_browser/register.py @ 487:e588335b6aa8

browser and server side: force lower case for the profile name at new account creation + fixes CSS for textarea
author souliane <souliane@mailoo.org>
date Thu, 19 Jun 2014 19:28:17 +0200
parents bbdc5357dc00
children a5019e62c3e9
comparison
equal deleted inserted replaced
486:600a71743072 487:e588335b6aa8
187 else: 187 else:
188 self.submit_type.setValue('login') 188 self.submit_type.setValue('login')
189 self.submit() 189 self.submit()
190 190
191 def onRegister(self, button): 191 def onRegister(self, button):
192 # XXX: for now libervia forces the creation to lower case
193 self.register_login_box.setText(self.register_login_box.getText().lower())
192 if not re.match(r'^[a-z0-9_-]+$', self.register_login_box.getText(), re.IGNORECASE): 194 if not re.match(r'^[a-z0-9_-]+$', self.register_login_box.getText(), re.IGNORECASE):
193 self.register_warning_msg.setHTML(_('Invalid login, valid characters<br>are a-z A-Z 0-9 _ -')) 195 self.register_warning_msg.setHTML(_('Invalid login, valid characters<br>are a-z A-Z 0-9 _ -'))
194 self.register_warning_msg.setVisible(True) 196 self.register_warning_msg.setVisible(True)
195 elif not re.match(r'^.+@.+\..+', self.email_box.getText(), re.IGNORECASE): 197 elif not re.match(r'^.+@.+\..+', self.email_box.getText(), re.IGNORECASE):
196 self.register_warning_msg.setHTML(_('Invalid email address')) 198 self.register_warning_msg.setHTML(_('Invalid email address'))