1
0
forked from ScoDoc/ScoDoc

fix typo creation users

This commit is contained in:
Emmanuel Viennet 2021-09-11 22:46:37 +02:00
parent 104c01ee29
commit 914c20bcfe

View File

@ -209,7 +209,7 @@ def create_user_form(REQUEST, user_name=None, edit=0):
},
),
(
"passwd",
"password",
{
"title": "Mot de passe",
"input_type": "password",
@ -219,7 +219,7 @@ def create_user_form(REQUEST, user_name=None, edit=0):
},
),
(
"passwd2",
"password2",
{
"title": "Confirmer mot de passe",
"input_type": "password",
@ -392,11 +392,11 @@ def create_user_form(REQUEST, user_name=None, edit=0):
return "\n".join(H) + "\n" + tf[1] + F
if edit: # modif utilisateur (mais pas passwd ni user_name !)
if edit: # modif utilisateur (mais pas password ni user_name !)
if (not can_choose_dept) and "dept" in vals:
del vals["dept"]
if "passwd" in vals:
del vals["passwd"]
if "password" in vals:
del vals["passwordd"]
if "date_modif_passwd" in vals:
del vals["date_modif_passwd"]
if "user_name" in vals:
@ -442,13 +442,13 @@ def create_user_form(REQUEST, user_name=None, edit=0):
)
return "\n".join(H) + msg + "\n" + tf[1] + F
# check passwords
if vals["passwd"]:
if vals["passwd"] != vals["passwd2"]:
if vals["password"]:
if vals["password"] != vals["password2"]:
msg = tf_error_message(
"""Les deux mots de passes ne correspondent pas !"""
)
return "\n".join(H) + msg + "\n" + tf[1] + F
if not sco_users.is_valid_password(vals["passwd"]):
if not sco_users.is_valid_password(vals["password"]):
msg = tf_error_message(
"""Mot de passe trop simple, recommencez !"""
)