Browse Source

Improve UX password_match_message()

pull/834/head
Andrea 8 years ago
committed by Nhomar Hernández [Vauxoo]
parent
commit
f7d6e408ba
  1. 8
      password_security/models/res_users.py

8
password_security/models/res_users.py

@ -48,13 +48,13 @@ class ResUsers(models.Model):
company_id = self.company_id
message = []
if company_id.password_lower:
message.append('* ' + _('Lowercase letter'))
message.append('\n* ' + _('Lowercase letter'))
if company_id.password_upper:
message.append('* ' + _('Uppercase letter'))
message.append('\n* ' + _('Uppercase letter'))
if company_id.password_numeric:
message.append('* ' + _('Numeric digit'))
message.append('\n* ' + _('Numeric digit'))
if company_id.password_special:
message.append('* ' + _('Special character'))
message.append('\n* ' + _('Special character'))
if len(message):
message = [_('Must contain the following:')] + message
if company_id.password_length:

Loading…
Cancel
Save