]> CRI, Mines Paris - PSL - Plinn.git/commitdiff
Inscription avec validation de l'email et email en tant que login opérationnelle.
authorBenoît Pin <pin@cri.ensmp.fr>
Thu, 16 Apr 2015 14:40:24 +0000 (16:40 +0200)
committerBenoît Pin <pin@cri.ensmp.fr>
Thu, 16 Apr 2015 14:40:24 +0000 (16:40 +0200)
Products/Plinn/RegistrationTool.py
Products/Plinn/locales/en/LC_MESSAGES/plinn.mo
Products/Plinn/locales/en/LC_MESSAGES/plinn.po
Products/Plinn/locales/fr/LC_MESSAGES/plinn.mo
Products/Plinn/locales/fr/LC_MESSAGES/plinn.po
Products/Plinn/locales/plinn.pot
Products/Plinn/skins/custom_generic/join_form.py
Products/Plinn/skins/custom_generic/join_template.pt
Products/Plinn/skins/generic/password_reset_form.py
Products/Plinn/skins/generic/password_reset_mail.py

index 3cd5e4db6ab27fb2242e6aa5d5686d5ce632acee..3451d375316685181c100d896332a2db1c6c6177 100644 (file)
@@ -233,7 +233,7 @@ class RegistrationTool(BaseRegistrationTool) :
         return str(uuid4())
 
     security.declarePublic('requestPasswordReset')
         return str(uuid4())
 
     security.declarePublic('requestPasswordReset')
-    def requestPasswordReset(self, userid, initialize=False):
+    def requestPasswordReset(self, userid, initial=False):
         """ add uuid / (userid, expiration) pair
             if ok: send an email to member. returns error message otherwise.
         """
         """ add uuid / (userid, expiration) pair
             if ok: send an email to member. returns error message otherwise.
         """
@@ -263,12 +263,15 @@ class RegistrationTool(BaseRegistrationTool) :
             mailhost = portal.MailHost
             sender = encodeQuopriEmail(ptool.getProperty('email_from_name'), ptool.getProperty('email_from_address'))
             to = encodeQuopriEmail(member.getMemberFullName(nameBefore=0), member.getProperty('email'))
             mailhost = portal.MailHost
             sender = encodeQuopriEmail(ptool.getProperty('email_from_name'), ptool.getProperty('email_from_address'))
             to = encodeQuopriEmail(member.getMemberFullName(nameBefore=0), member.getProperty('email'))
-            if initialize :
-                subject = translate(_('How to initialize your password on the %s website')) % ptool.getProperty('title')
+            if initial :
+                subject = translate(_('Complete your registration on the %s website')) % ptool.getProperty('title')
             else :
                 subject = translate(_('How to reset your password on the %s website')) % ptool.getProperty('title')
             subject = encodeMailHeader(subject)
             else :
                 subject = translate(_('How to reset your password on the %s website')) % ptool.getProperty('title')
             subject = encodeMailHeader(subject)
-            options = {'fullName' : member.getMemberFullName(nameBefore=0),
+            options = {'initial' : initial,
+                       'fullName' : member.getMemberFullName(nameBefore=0),
+                       'member_id' : member.getId(),
+                       'loginIsNotEmail' : member.getId() != member.getProperty('email'),
                        'siteName' : ptool.getProperty('title'),
                        'resetPasswordUrl' : '%s/password_reset_form/%s' % (utool(), uuid)}
             body = self.password_reset_mail(options)
                        'siteName' : ptool.getProperty('title'),
                        'resetPasswordUrl' : '%s/password_reset_form/%s' % (utool(), uuid)}
             body = self.password_reset_mail(options)
index 4279cc3ab45a2f3b9b2db33b260dfa25b588f229..d79bd63e53542739d7194f939f5f22d2905207d3 100644 (file)
Binary files a/Products/Plinn/locales/en/LC_MESSAGES/plinn.mo and b/Products/Plinn/locales/en/LC_MESSAGES/plinn.mo differ
index 60e2dc4bd192c563793f0798076b022c5487e0a0..6a1d96628cb9eb6260d320e81cdc61e95483274d 100644 (file)
@@ -14,7 +14,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: 2.0 beta 1\n"
 msgid ""
 msgstr ""
 "Project-Id-Version: 2.0 beta 1\n"
-"POT-Creation-Date: Wed Apr 15 17:38:57 2015\n"
+"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n"
 "PO-Revision-Date: 2015-04-15 17:00+0200\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
 "PO-Revision-Date: 2015-04-15 17:00+0200\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
@@ -32,27 +32,31 @@ msgstr "Object deleted"
 msgid "Please rename each listed object."
 msgstr "Please rename each listed object."
 
 msgid "Please rename each listed object."
 msgstr "Please rename each listed object."
 
-#: n/RegistrationTool.py:254
+#: n/RegistrationTool.py:267
+msgid "Complete your registration on the %s website"
+msgstr "Complete your registration on the %s website"
+
+#: n/RegistrationTool.py:269
 msgid "How to reset your password on the %s website"
 msgstr "How to reset your password on the %s website"
 
 msgid "How to reset your password on the %s website"
 msgstr "How to reset your password on the %s website"
 
-#: n/RegistrationTool.py:269
+#: n/RegistrationTool.py:287
 msgid "Unknown user name. Please retry."
 msgstr "Unknown user name. Please retry."
 
 msgid "Unknown user name. Please retry."
 msgstr "Unknown user name. Please retry."
 
-#: n/RegistrationTool.py:284
+#: n/RegistrationTool.py:302
 msgid "Invalid reset password request."
 msgstr "Invalid reset password request."
 
 msgid "Invalid reset password request."
 msgstr "Invalid reset password request."
 
-#: n/RegistrationTool.py:290
+#: n/RegistrationTool.py:308
 msgid "Your reset password request has expired. You can ask a new one."
 msgstr "Your reset password request has expired. You can ask a new one."
 
 msgid "Your reset password request has expired. You can ask a new one."
 msgstr "Your reset password request has expired. You can ask a new one."
 
-#: n/RegistrationTool.py:299
+#: n/RegistrationTool.py:317
 msgid "Password successfully updated."
 msgstr "Password successfully updated."
 
 msgid "Password successfully updated."
 msgstr "Password successfully updated."
 
-#: n/RegistrationTool.py:301
+#: n/RegistrationTool.py:319
 msgid "\"%s\" username not found."
 msgstr "\"%s\" username not found."
 
 msgid "\"%s\" username not found."
 msgstr "\"%s\" username not found."
 
@@ -592,7 +596,11 @@ msgstr "No news is no news."
 msgid "More..."
 msgstr "More..."
 
 msgid "More..."
 msgstr "More..."
 
-#: n/skins/custom_generic/join_form.py:60
+#: n/skins/custom_generic/join_form.py:41
+msgid "Success!"
+msgstr "Success!"
+
+#: n/skins/custom_generic/join_form.py:67
 #: n/skins/photo_theme/photo_main_macros.pt:28
 msgid "Join"
 msgstr "Join"
 #: n/skins/photo_theme/photo_main_macros.pt:28
 msgid "Join"
 msgstr "Join"
@@ -619,11 +627,11 @@ msgstr "You have been registered as a member."
 
 #: n/skins/custom_generic/join_template.pt:24
 msgid ""
 
 #: n/skins/custom_generic/join_template.pt:24
 msgid ""
-"You will receive an email shortly containing your password and instructions "
-"on how to activate your membership."
+"You will receive an email shortly. Please follow sent instructions to "
+"complete your registration."
 msgstr ""
 msgstr ""
-"You will receive an email shortly containing your password and instructions "
-"on how to activate your membership."
+"You will receive an email shortly. Please follow sent instructions to "
+"complete your registration."
 
 #: n/skins/custom_generic/join_template.pt:29
 msgid "Click the button to log in immediately."
 
 #: n/skins/custom_generic/join_template.pt:29
 msgid "Click the button to log in immediately."
@@ -655,57 +663,35 @@ msgstr ""
 msgid "Return to homepage"
 msgstr "Return to homepage"
 
 msgid "Return to homepage"
 msgstr "Return to homepage"
 
-#: n/skins/custom_generic/join_template.pt:56
-msgid ""
-"Becoming a member gives you the ability to personalize the site and "
-"participate in the community."
-msgstr ""
-"Becoming a member gives you the ability to personalize the site and "
-"participate in the community."
-
-#: n/skins/custom_generic/join_template.pt:60
-msgid ""
-"It does not cost any money to become a member and your email and other "
-"personal information will remain private."
-msgstr ""
-"It does not cost any money to become a member and your email and other "
-"personal information will remain private."
-
-#: n/skins/custom_generic/join_template.pt:64
-msgid ""
-"You must submit a valid email address. This address will be used to send you "
-"a randomly-generated password. Once you have logged in with this password, "
-"you may change it to anything you like."
-msgstr ""
-"You must submit a valid email address. This address will be used to send you "
-"a randomly-generated password. Once you have logged in with this password, "
-"you may change it to anything you like."
-
-#: n/skins/custom_generic/join_template.pt:76
+#: n/skins/custom_generic/join_template.pt:61
 msgid "First name"
 msgstr "First name"
 
 msgid "First name"
 msgstr "First name"
 
-#: n/skins/custom_generic/join_template.pt:81
+#: n/skins/custom_generic/join_template.pt:66
 msgid "Last name"
 msgstr "Last name"
 
 msgid "Last name"
 msgstr "Last name"
 
-#: n/skins/custom_generic/join_template.pt:88
+#: n/skins/custom_generic/join_template.pt:73
 #: n/skins/custom_generic/personalize_form.pt:39
 #: n/skins/generic/gruf_macros.pt:280 n/skins/generic/gruf_macros.pt:402
 msgid "Email address"
 msgstr "Email address"
 
 #: n/skins/custom_generic/personalize_form.pt:39
 #: n/skins/generic/gruf_macros.pt:280 n/skins/generic/gruf_macros.pt:402
 msgid "Email address"
 msgstr "Email address"
 
-#: n/skins/custom_generic/join_template.pt:94
+#: n/skins/custom_generic/join_template.pt:79
 msgid "use as login"
 msgstr "use as login"
 
 msgid "use as login"
 msgstr "use as login"
 
-#: n/skins/custom_generic/join_template.pt:101
+#: n/skins/custom_generic/join_template.pt:85
+msgid "login"
+msgstr "login"
+
+#: n/skins/custom_generic/join_template.pt:93
 #: n/skins/custom_generic/login_form.pt:28 n/skins/generic/gruf_macros.pt:268
 #: n/skins/generic/gruf_macros.pt:390
 msgid "Password"
 msgstr "Password"
 
 #: n/skins/custom_generic/login_form.pt:28 n/skins/generic/gruf_macros.pt:268
 #: n/skins/generic/gruf_macros.pt:390
 msgid "Password"
 msgstr "Password"
 
-#: n/skins/custom_generic/join_template.pt:107
+#: n/skins/custom_generic/join_template.pt:99
 msgid "Password (confirm)"
 msgstr "Password (confirm)"
 
 msgid "Password (confirm)"
 msgstr "Password (confirm)"
 
@@ -799,7 +785,7 @@ msgid "Remember my name."
 msgstr "Remember my name."
 
 #: n/skins/custom_generic/login_form.pt:43
 msgstr "Remember my name."
 
 #: n/skins/custom_generic/login_form.pt:43
-#: n/skins/generic/password_reset_form.py:26
+#: n/skins/generic/password_reset_form.py:25
 msgid " Login "
 msgstr " Login "
 
 msgid " Login "
 msgstr " Login "
 
@@ -1564,19 +1550,19 @@ msgstr "Paste"
 msgid "Exit boxes editing"
 msgstr "Exit boxes editing"
 
 msgid "Exit boxes editing"
 msgstr "Exit boxes editing"
 
-#: n/skins/generic/password_reset_form.py:30
+#: n/skins/generic/password_reset_form.py:29
 msgid "Update Password"
 msgstr "Update Password"
 
 msgid "Update Password"
 msgstr "Update Password"
 
-#: n/skins/generic/password_reset_mail.py:4
+#: n/skins/generic/password_reset_mail.py:5
 msgid "Hi %(fullName)s,"
 msgstr "Hi %(fullName)s,"
 
 msgid "Hi %(fullName)s,"
 msgstr "Hi %(fullName)s,"
 
-#: n/skins/generic/password_reset_mail.py:6
+#: n/skins/generic/password_reset_mail.py:8
 msgid "You recently asked to reset your password."
 msgstr "You recently asked to reset your password."
 
 msgid "You recently asked to reset your password."
 msgstr "You recently asked to reset your password."
 
-#: n/skins/generic/password_reset_mail.py:8
+#: n/skins/generic/password_reset_mail.py:10
 msgid ""
 "To get back into your account on the %(siteName)s website, you'll need to "
 "create a new password."
 msgid ""
 "To get back into your account on the %(siteName)s website, you'll need to "
 "create a new password."
@@ -1584,18 +1570,40 @@ msgstr ""
 "To get back into your account on the %(siteName)s website, you'll need to "
 "create a new password."
 
 "To get back into your account on the %(siteName)s website, you'll need to "
 "create a new password."
 
-#: n/skins/generic/password_reset_mail.py:9
+#: n/skins/generic/password_reset_mail.py:11
+#: n/skins/generic/password_reset_mail.py:18
 msgid "It's easy:"
 msgstr "It's easy:"
 
 msgid "It's easy:"
 msgstr "It's easy:"
 
-#: n/skins/generic/password_reset_mail.py:10
+#: n/skins/generic/password_reset_mail.py:12
+#: n/skins/generic/password_reset_mail.py:19
 msgid "Click the link below to open a browser window."
 msgstr "Click the link below to open a browser window."
 
 msgid "Click the link below to open a browser window."
 msgstr "Click the link below to open a browser window."
 
-#: n/skins/generic/password_reset_mail.py:11
+#: n/skins/generic/password_reset_mail.py:13
 msgid "Fill the form with your new password."
 msgstr "Fill the form with your new password."
 
 msgid "Fill the form with your new password."
 msgstr "Fill the form with your new password."
 
+#: n/skins/generic/password_reset_mail.py:16
+msgid "You just sign up on the %(siteName)s website."
+msgstr "You just sign up on the %(siteName)s website."
+
+#: n/skins/generic/password_reset_mail.py:17
+msgid "Now you have to create your password to complete your registration."
+msgstr "Now you have to create your password to complete your registration."
+
+#: n/skins/generic/password_reset_mail.py:20
+msgid "Choose a password and enter it in the form."
+msgstr "Choose a password and enter it in the form."
+
+#: n/skins/generic/password_reset_mail.py:25
+msgid "Please note:"
+msgstr "Please note:"
+
+#: n/skins/generic/password_reset_mail.py:26
+msgid "Your personal login to sign in later is:"
+msgstr "Your personal login to sign in later is:"
+
 #: n/skins/generic/password_reset_template.pt:16
 msgid "Password resetting"
 msgstr "Password resetting"
 #: n/skins/generic/password_reset_template.pt:16
 msgid "Password resetting"
 msgstr "Password resetting"
@@ -2533,7 +2541,9 @@ msgid "Member properties"
 msgstr "Member properties"
 
 msgid "member_creation_area_explanations"
 msgstr "Member properties"
 
 msgid "member_creation_area_explanations"
-msgstr "This function determines if a personal folder will be created at the first user entrance."
+msgstr ""
+"This function determines if a personal folder will be created at the first "
+"user entrance."
 
 msgid "member_creation_area_title"
 msgstr "Creation of member areas"
 
 msgid "member_creation_area_title"
 msgstr "Creation of member areas"
@@ -2542,7 +2552,9 @@ msgid "Membership role mappings"
 msgstr "Membership role mappings"
 
 msgid "membership_role_mapping_explanations"
 msgstr "Membership role mappings"
 
 msgid "membership_role_mapping_explanations"
-msgstr "Use this screen if you are using a userfolder other than the built-in folder to map existing role names to roles understood by the CMF."
+msgstr ""
+"Use this screen if you are using a userfolder other than the built-in folder "
+"to map existing role names to roles understood by the CMF."
 
 msgid "Metadata"
 msgstr "Metadata"
 
 msgid "Metadata"
 msgstr "Metadata"
@@ -2929,6 +2941,45 @@ msgstr "Directory"
 msgid "Configure portal"
 msgstr "Configure portal"
 
 msgid "Configure portal"
 msgstr "Configure portal"
 
+#~ msgid "Your personal login to log in later is:"
+#~ msgstr "Your personal login to log in later is:"
+
+#~ msgid "%(member_id)s"
+#~ msgstr "%(member_id)s"
+
+#~ msgid "How to initialize your password on the %s website"
+#~ msgstr "How to initialize your password on the %s website"
+
+#~ msgid ""
+#~ "You will receive an email shortly containing your password and "
+#~ "instructions on how to activate your membership."
+#~ msgstr ""
+#~ "You will receive an email shortly containing your password and "
+#~ "instructions on how to activate your membership."
+
+#~ msgid ""
+#~ "Becoming a member gives you the ability to personalize the site and "
+#~ "participate in the community."
+#~ msgstr ""
+#~ "Becoming a member gives you the ability to personalize the site and "
+#~ "participate in the community."
+
+#~ msgid ""
+#~ "It does not cost any money to become a member and your email and other "
+#~ "personal information will remain private."
+#~ msgstr ""
+#~ "It does not cost any money to become a member and your email and other "
+#~ "personal information will remain private."
+
+#~ msgid ""
+#~ "You must submit a valid email address. This address will be used to send "
+#~ "you a randomly-generated password. Once you have logged in with this "
+#~ "password, you may change it to anything you like."
+#~ msgstr ""
+#~ "You must submit a valid email address. This address will be used to send "
+#~ "you a randomly-generated password. Once you have logged in with this "
+#~ "password, you may change it to anything you like."
+
 #~ msgid ""
 #~ "You are already a member. You may use the <a href=\"personalize_form"
 #~ "\">personalization form</a> to change your membership information."
 #~ msgid ""
 #~ "You are already a member. You may use the <a href=\"personalize_form"
 #~ "\">personalization form</a> to change your membership information."
index 0942bc6edb2e25a3f9aecf383c98381cca5063ac..065fa1890f0a07df38fbd26d368f2a020f118ab8 100644 (file)
Binary files a/Products/Plinn/locales/fr/LC_MESSAGES/plinn.mo and b/Products/Plinn/locales/fr/LC_MESSAGES/plinn.mo differ
index 8747019c339c9bfbac3dd0f30e26131ecdd8ca7f..f07a60a07a160c1cd949dee81cd7652e2eab67e0 100644 (file)
@@ -1,7 +1,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Plinn 2.0\n"
 msgid ""
 msgstr ""
 "Project-Id-Version: Plinn 2.0\n"
-"POT-Creation-Date: Wed Apr 15 17:26:41 2015\n"
+"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n"
 "PO-Revision-Date: 2015-04-15 15:06+0200\n"
 "Last-Translator:  Benoît PIN\n"
 "Language-Team: CRI http://cri.ensmp.fr\n"
 "PO-Revision-Date: 2015-04-15 15:06+0200\n"
 "Last-Translator:  Benoît PIN\n"
 "Language-Team: CRI http://cri.ensmp.fr\n"
@@ -24,29 +24,33 @@ msgstr "Objet supprimé"
 msgid "Please rename each listed object."
 msgstr "Veuillez renommer tous les éléments listés."
 
 msgid "Please rename each listed object."
 msgstr "Veuillez renommer tous les éléments listés."
 
-#: n/RegistrationTool.py:254
+#: n/RegistrationTool.py:267
+msgid "Complete your registration on the %s website"
+msgstr "Terminer votre inscription sur le site %s"
+
+#: n/RegistrationTool.py:269
 msgid "How to reset your password on the %s website"
 msgstr "Comment réinitialiser votre mot de passe sur le site %s"
 
 msgid "How to reset your password on the %s website"
 msgstr "Comment réinitialiser votre mot de passe sur le site %s"
 
-#: n/RegistrationTool.py:269
+#: n/RegistrationTool.py:287
 msgid "Unknown user name. Please retry."
 msgstr "Nom d'utilisateur inconnu. Veuillez réessayer."
 
 msgid "Unknown user name. Please retry."
 msgstr "Nom d'utilisateur inconnu. Veuillez réessayer."
 
-#: n/RegistrationTool.py:284
+#: n/RegistrationTool.py:302
 msgid "Invalid reset password request."
 msgstr "Demande de réinitialisation de mot de passe invalide."
 
 msgid "Invalid reset password request."
 msgstr "Demande de réinitialisation de mot de passe invalide."
 
-#: n/RegistrationTool.py:290
+#: n/RegistrationTool.py:308
 msgid "Your reset password request has expired. You can ask a new one."
 msgstr ""
 "Votre demande de réinitialisation de mot de passe a expiré. Vous pouvez en "
 "demander une nouvelle."
 
 msgid "Your reset password request has expired. You can ask a new one."
 msgstr ""
 "Votre demande de réinitialisation de mot de passe a expiré. Vous pouvez en "
 "demander une nouvelle."
 
-#: n/RegistrationTool.py:299
+#: n/RegistrationTool.py:317
 msgid "Password successfully updated."
 msgstr "Mot de passe correctement mis à jour."
 
 msgid "Password successfully updated."
 msgstr "Mot de passe correctement mis à jour."
 
-#: n/RegistrationTool.py:301
+#: n/RegistrationTool.py:319
 msgid "\"%s\" username not found."
 msgstr "Nom : « %s » non trouvé."
 
 msgid "\"%s\" username not found."
 msgstr "Nom : « %s » non trouvé."
 
@@ -585,7 +589,11 @@ msgstr "Pas de nouvelle bonne nouvelle !"
 msgid "More..."
 msgstr "Plus…"
 
 msgid "More..."
 msgstr "Plus…"
 
-#: n/skins/custom_generic/join_form.py:60
+#: n/skins/custom_generic/join_form.py:41
+msgid "Success!"
+msgstr "Succès !"
+
+#: n/skins/custom_generic/join_form.py:67
 #: n/skins/photo_theme/photo_main_macros.pt:28
 msgid "Join"
 msgstr "S'inscrire"
 #: n/skins/photo_theme/photo_main_macros.pt:28
 msgid "Join"
 msgstr "S'inscrire"
@@ -598,7 +606,9 @@ msgstr "Devenir membre"
 msgid ""
 "You are already authenticated. You may use the ${personalize_form} to change "
 "your personal informations."
 msgid ""
 "You are already authenticated. You may use the ${personalize_form} to change "
 "your personal informations."
-msgstr "Vous êtes déjà authentifié. Vous pouvez utiliser le ${personalize_form} pour modifier vos informations personnelles."
+msgstr ""
+"Vous êtes déjà authentifié. Vous pouvez utiliser le ${personalize_form} pour "
+"modifier vos informations personnelles."
 
 #: n/skins/custom_generic/join_template.pt:16
 msgid "personalization form"
 
 #: n/skins/custom_generic/join_template.pt:16
 msgid "personalization form"
@@ -610,11 +620,11 @@ msgstr "Vous avez été enregistré en tant que membre."
 
 #: n/skins/custom_generic/join_template.pt:24
 msgid ""
 
 #: n/skins/custom_generic/join_template.pt:24
 msgid ""
-"You will receive an email shortly containing your password and instructions "
-"on how to activate your membership."
+"You will receive an email shortly. Please follow sent instructions to "
+"complete your registration."
 msgstr ""
 msgstr ""
-"Vous allez recevoir sous peu un e-mail qui contiendra votre mot de passe "
-"ainsi que les instructions pour activer votre inscription."
+"Vous allez recevoir un e-mail sous peu. Veuillez suivre les instructions "
+"envoyées afin de terminer votre inscription."
 
 #: n/skins/custom_generic/join_template.pt:29
 msgid "Click the button to log in immediately."
 
 #: n/skins/custom_generic/join_template.pt:29
 msgid "Click the button to log in immediately."
@@ -646,57 +656,35 @@ msgstr ""
 msgid "Return to homepage"
 msgstr "Retour à la page d'accueil"
 
 msgid "Return to homepage"
 msgstr "Retour à la page d'accueil"
 
-#: n/skins/custom_generic/join_template.pt:56
-msgid ""
-"Becoming a member gives you the ability to personalize the site and "
-"participate in the community."
-msgstr ""
-"Devenir membre vous donne la possibilité de personaliser le site et de "
-"participer à la communauté."
-
-#: n/skins/custom_generic/join_template.pt:60
-msgid ""
-"It does not cost any money to become a member and your email and other "
-"personal information will remain private."
-msgstr ""
-"Devenir membre est complètement gratuit. Votre e-mail ainsi que toutes vos "
-"données personnelles resteront privées."
-
-#: n/skins/custom_generic/join_template.pt:64
-msgid ""
-"You must submit a valid email address. This address will be used to send you "
-"a randomly-generated password. Once you have logged in with this password, "
-"you may change it to anything you like."
-msgstr ""
-"Vous devez entrer une adresse e-mail valide qui sera utilisée pour vous "
-"envoyer votre mot de passe généré automatiquement. Vous pourrez le changer "
-"dès votre première connexion."
-
-#: n/skins/custom_generic/join_template.pt:76
+#: n/skins/custom_generic/join_template.pt:61
 msgid "First name"
 msgstr "Prénom"
 
 msgid "First name"
 msgstr "Prénom"
 
-#: n/skins/custom_generic/join_template.pt:81
+#: n/skins/custom_generic/join_template.pt:66
 msgid "Last name"
 msgstr "Nom"
 
 msgid "Last name"
 msgstr "Nom"
 
-#: n/skins/custom_generic/join_template.pt:88
+#: n/skins/custom_generic/join_template.pt:73
 #: n/skins/custom_generic/personalize_form.pt:39
 #: n/skins/generic/gruf_macros.pt:280 n/skins/generic/gruf_macros.pt:402
 msgid "Email address"
 msgstr "Adresse e-mail"
 
 #: n/skins/custom_generic/personalize_form.pt:39
 #: n/skins/generic/gruf_macros.pt:280 n/skins/generic/gruf_macros.pt:402
 msgid "Email address"
 msgstr "Adresse e-mail"
 
-#: n/skins/custom_generic/join_template.pt:94
+#: n/skins/custom_generic/join_template.pt:79
 msgid "use as login"
 msgstr "utiliser comme identifiant"
 
 msgid "use as login"
 msgstr "utiliser comme identifiant"
 
-#: n/skins/custom_generic/join_template.pt:101
+#: n/skins/custom_generic/join_template.pt:85
+msgid "login"
+msgstr "identifiant"
+
+#: n/skins/custom_generic/join_template.pt:93
 #: n/skins/custom_generic/login_form.pt:28 n/skins/generic/gruf_macros.pt:268
 #: n/skins/generic/gruf_macros.pt:390
 msgid "Password"
 msgstr "Mot de passe"
 
 #: n/skins/custom_generic/login_form.pt:28 n/skins/generic/gruf_macros.pt:268
 #: n/skins/generic/gruf_macros.pt:390
 msgid "Password"
 msgstr "Mot de passe"
 
-#: n/skins/custom_generic/join_template.pt:107
+#: n/skins/custom_generic/join_template.pt:99
 msgid "Password (confirm)"
 msgstr "Confirmation"
 
 msgid "Password (confirm)"
 msgstr "Confirmation"
 
@@ -794,7 +782,7 @@ msgid "Remember my name."
 msgstr "Se souvenir de mon login."
 
 #: n/skins/custom_generic/login_form.pt:43
 msgstr "Se souvenir de mon login."
 
 #: n/skins/custom_generic/login_form.pt:43
-#: n/skins/generic/password_reset_form.py:26
+#: n/skins/generic/password_reset_form.py:25
 msgid " Login "
 msgstr "Connexion"
 
 msgid " Login "
 msgstr "Connexion"
 
@@ -1282,12 +1270,13 @@ msgstr "Partager"
 msgid "Submit: \"${objectid}\" for Review."
 msgstr "Soumettre : «&nbsp;${objectid}&nbsp;» pour validation."
 
 msgid "Submit: \"${objectid}\" for Review."
 msgstr "Soumettre : «&nbsp;${objectid}&nbsp;» pour validation."
 
+#. Default: "Submit this content to request a validation by a reviewer."
 #: n/skins/generic/content_submit_form.pt:9
 msgid "submit_transition_explanations"
 msgstr ""
 "Soumettre ce document en vue d'une validation accordée par un modérateur."
 
 #: n/skins/generic/content_submit_form.pt:9
 msgid "submit_transition_explanations"
 msgstr ""
 "Soumettre ce document en vue d'une validation accordée par un modérateur."
 
-#: n/skins/generic/content_submit_form.pt:15
+#: n/skins/generic/content_submit_form.pt:17
 msgid "Submit"
 msgstr "Soumettre"
 
 msgid "Submit"
 msgstr "Soumettre"
 
@@ -1567,19 +1556,19 @@ msgstr "Coller"
 msgid "Exit boxes editing"
 msgstr "Quitter l'édition des boîtes"
 
 msgid "Exit boxes editing"
 msgstr "Quitter l'édition des boîtes"
 
-#: n/skins/generic/password_reset_form.py:30
+#: n/skins/generic/password_reset_form.py:29
 msgid "Update Password"
 msgstr "Mettre à jour le mot de passe"
 
 msgid "Update Password"
 msgstr "Mettre à jour le mot de passe"
 
-#: n/skins/generic/password_reset_mail.py:4
+#: n/skins/generic/password_reset_mail.py:5
 msgid "Hi %(fullName)s,"
 msgstr "Bonjour %(fullName)s,"
 
 msgid "Hi %(fullName)s,"
 msgstr "Bonjour %(fullName)s,"
 
-#: n/skins/generic/password_reset_mail.py:6
+#: n/skins/generic/password_reset_mail.py:8
 msgid "You recently asked to reset your password."
 msgstr "Vous avez récemment demandé de réinitialiser votre mot de passe."
 
 msgid "You recently asked to reset your password."
 msgstr "Vous avez récemment demandé de réinitialiser votre mot de passe."
 
-#: n/skins/generic/password_reset_mail.py:8
+#: n/skins/generic/password_reset_mail.py:10
 msgid ""
 "To get back into your account on the %(siteName)s website, you'll need to "
 "create a new password."
 msgid ""
 "To get back into your account on the %(siteName)s website, you'll need to "
 "create a new password."
@@ -1587,18 +1576,42 @@ msgstr ""
 "Pour accéder à nouveau à votre compte sur le site %(siteName)s, vous devez "
 "créer un nouveau mot de passe."
 
 "Pour accéder à nouveau à votre compte sur le site %(siteName)s, vous devez "
 "créer un nouveau mot de passe."
 
-#: n/skins/generic/password_reset_mail.py:9
+#: n/skins/generic/password_reset_mail.py:11
+#: n/skins/generic/password_reset_mail.py:18
 msgid "It's easy:"
 msgstr "Rien de plus simple :"
 
 msgid "It's easy:"
 msgstr "Rien de plus simple :"
 
-#: n/skins/generic/password_reset_mail.py:10
+#: n/skins/generic/password_reset_mail.py:12
+#: n/skins/generic/password_reset_mail.py:19
 msgid "Click the link below to open a browser window."
 msgstr "Cliquez sur le lien ci-dessous pour ouvrir une fenêtre de navigateur."
 
 msgid "Click the link below to open a browser window."
 msgstr "Cliquez sur le lien ci-dessous pour ouvrir une fenêtre de navigateur."
 
-#: n/skins/generic/password_reset_mail.py:11
+#: n/skins/generic/password_reset_mail.py:13
 msgid "Fill the form with your new password."
 msgstr "Remplissez le formulaire avec votre nouveau mot de passe."
 
 msgid "Fill the form with your new password."
 msgstr "Remplissez le formulaire avec votre nouveau mot de passe."
 
+#: n/skins/generic/password_reset_mail.py:16
+msgid "You just sign up on the %(siteName)s website."
+msgstr "Vous venez de vous inscrire sur le site %(siteName)s."
+
+#: n/skins/generic/password_reset_mail.py:17
+msgid "Now you have to create your password to complete your registration."
+msgstr ""
+"Vous devez maintenant créer votre mot de passe pour terminer votre "
+"inscription."
+
+#: n/skins/generic/password_reset_mail.py:20
+msgid "Choose a password and enter it in the form."
+msgstr "Veuillez choisir un mot de passe et le saisir dans le formulaire."
+
+#: n/skins/generic/password_reset_mail.py:25
+msgid "Please note:"
+msgstr "Notez bien :"
+
+#: n/skins/generic/password_reset_mail.py:26
+msgid "Your personal login to sign in later is:"
+msgstr "Votre authentifiant pour vous connecter plus tard est :"
+
 #: n/skins/generic/password_reset_template.pt:16
 msgid "Password resetting"
 msgstr "Réinitialisation du mot de passe"
 #: n/skins/generic/password_reset_template.pt:16
 msgid "Password resetting"
 msgstr "Réinitialisation du mot de passe"
@@ -2947,6 +2960,36 @@ msgstr "Annuaire"
 msgid "Configure portal"
 msgstr "Configurer portail"
 
 msgid "Configure portal"
 msgstr "Configurer portail"
 
+#~ msgid ""
+#~ "You will receive an email shortly containing your password and "
+#~ "instructions on how to activate your membership."
+#~ msgstr ""
+#~ "Vous allez recevoir sous peu un e-mail qui contiendra votre mot de passe "
+#~ "ainsi que les instructions pour activer votre inscription."
+
+#~ msgid ""
+#~ "Becoming a member gives you the ability to personalize the site and "
+#~ "participate in the community."
+#~ msgstr ""
+#~ "Devenir membre vous donne la possibilité de personaliser le site et de "
+#~ "participer à la communauté."
+
+#~ msgid ""
+#~ "It does not cost any money to become a member and your email and other "
+#~ "personal information will remain private."
+#~ msgstr ""
+#~ "Devenir membre est complètement gratuit. Votre e-mail ainsi que toutes "
+#~ "vos données personnelles resteront privées."
+
+#~ msgid ""
+#~ "You must submit a valid email address. This address will be used to send "
+#~ "you a randomly-generated password. Once you have logged in with this "
+#~ "password, you may change it to anything you like."
+#~ msgstr ""
+#~ "Vous devez entrer une adresse e-mail valide qui sera utilisée pour vous "
+#~ "envoyer votre mot de passe généré automatiquement. Vous pourrez le "
+#~ "changer dès votre première connexion."
+
 #~ msgid ""
 #~ "You are already a member. You may use the <a href=\"personalize_form"
 #~ "\">personalization form</a> to change your membership information."
 #~ msgid ""
 #~ "You are already a member. You may use the <a href=\"personalize_form"
 #~ "\">personalization form</a> to change your membership information."
index 2b0facd33e28760ca06eebb16183d866bea56145..23989b620e381ed5272d1b2a8244ca4fd9932b81 100644 (file)
@@ -14,7 +14,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: 2.0 beta 1\n"
 msgid ""
 msgstr ""
 "Project-Id-Version: 2.0 beta 1\n"
-"POT-Creation-Date: Wed Apr 15 17:38:57 2015\n"
+"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Zope 3 Developers <zope-dev@zope.org>\n"
@@ -31,27 +31,31 @@ msgstr ""
 msgid "Please rename each listed object."
 msgstr ""
 
 msgid "Please rename each listed object."
 msgstr ""
 
-#: n/RegistrationTool.py:254
-msgid "How to reset your password on the %s website"
+#: n/RegistrationTool.py:267
+msgid "Complete your registration on the %s website"
 msgstr ""
 
 #: n/RegistrationTool.py:269
 msgstr ""
 
 #: n/RegistrationTool.py:269
+msgid "How to reset your password on the %s website"
+msgstr ""
+
+#: n/RegistrationTool.py:287
 msgid "Unknown user name. Please retry."
 msgstr ""
 
 msgid "Unknown user name. Please retry."
 msgstr ""
 
-#: n/RegistrationTool.py:284
+#: n/RegistrationTool.py:302
 msgid "Invalid reset password request."
 msgstr ""
 
 msgid "Invalid reset password request."
 msgstr ""
 
-#: n/RegistrationTool.py:290
+#: n/RegistrationTool.py:308
 msgid "Your reset password request has expired. You can ask a new one."
 msgstr ""
 
 msgid "Your reset password request has expired. You can ask a new one."
 msgstr ""
 
-#: n/RegistrationTool.py:299
+#: n/RegistrationTool.py:317
 msgid "Password successfully updated."
 msgstr ""
 
 msgid "Password successfully updated."
 msgstr ""
 
-#: n/RegistrationTool.py:301
+#: n/RegistrationTool.py:319
 msgid "\"%s\" username not found."
 msgstr ""
 
 msgid "\"%s\" username not found."
 msgstr ""
 
@@ -592,7 +596,11 @@ msgstr ""
 msgid "More..."
 msgstr ""
 
 msgid "More..."
 msgstr ""
 
-#: n/skins/custom_generic/join_form.py:60
+#: n/skins/custom_generic/join_form.py:41
+msgid "Success!"
+msgstr ""
+
+#: n/skins/custom_generic/join_form.py:67
 #: n/skins/photo_theme/photo_main_macros.pt:28
 msgid "Join"
 msgstr ""
 #: n/skins/photo_theme/photo_main_macros.pt:28
 msgid "Join"
 msgstr ""
@@ -614,7 +622,7 @@ msgid "You have been registered as a member."
 msgstr ""
 
 #: n/skins/custom_generic/join_template.pt:24
 msgstr ""
 
 #: n/skins/custom_generic/join_template.pt:24
-msgid "You will receive an email shortly containing your password and instructions on how to activate your membership."
+msgid "You will receive an email shortly. Please follow sent instructions to complete your registration."
 msgstr ""
 
 #: n/skins/custom_generic/join_template.pt:29
 msgstr ""
 
 #: n/skins/custom_generic/join_template.pt:29
@@ -637,45 +645,37 @@ msgstr ""
 msgid "Return to homepage"
 msgstr ""
 
 msgid "Return to homepage"
 msgstr ""
 
-#: n/skins/custom_generic/join_template.pt:56
-msgid "Becoming a member gives you the ability to personalize the site and participate in the community."
-msgstr ""
-
-#: n/skins/custom_generic/join_template.pt:60
-msgid "It does not cost any money to become a member and your email and other personal information will remain private."
-msgstr ""
-
-#: n/skins/custom_generic/join_template.pt:64
-msgid "You must submit a valid email address. This address will be used to send you a randomly-generated password. Once you have logged in with this password, you may change it to anything you like."
-msgstr ""
-
-#: n/skins/custom_generic/join_template.pt:76
+#: n/skins/custom_generic/join_template.pt:61
 msgid "First name"
 msgstr ""
 
 msgid "First name"
 msgstr ""
 
-#: n/skins/custom_generic/join_template.pt:81
+#: n/skins/custom_generic/join_template.pt:66
 msgid "Last name"
 msgstr ""
 
 msgid "Last name"
 msgstr ""
 
-#: n/skins/custom_generic/join_template.pt:88
+#: n/skins/custom_generic/join_template.pt:73
 #: n/skins/custom_generic/personalize_form.pt:39
 #: n/skins/generic/gruf_macros.pt:280
 #: n/skins/generic/gruf_macros.pt:402
 msgid "Email address"
 msgstr ""
 
 #: n/skins/custom_generic/personalize_form.pt:39
 #: n/skins/generic/gruf_macros.pt:280
 #: n/skins/generic/gruf_macros.pt:402
 msgid "Email address"
 msgstr ""
 
-#: n/skins/custom_generic/join_template.pt:94
+#: n/skins/custom_generic/join_template.pt:79
 msgid "use as login"
 msgstr ""
 
 msgid "use as login"
 msgstr ""
 
-#: n/skins/custom_generic/join_template.pt:101
+#: n/skins/custom_generic/join_template.pt:85
+msgid "login"
+msgstr ""
+
+#: n/skins/custom_generic/join_template.pt:93
 #: n/skins/custom_generic/login_form.pt:28
 #: n/skins/generic/gruf_macros.pt:268
 #: n/skins/generic/gruf_macros.pt:390
 msgid "Password"
 msgstr ""
 
 #: n/skins/custom_generic/login_form.pt:28
 #: n/skins/generic/gruf_macros.pt:268
 #: n/skins/generic/gruf_macros.pt:390
 msgid "Password"
 msgstr ""
 
-#: n/skins/custom_generic/join_template.pt:107
+#: n/skins/custom_generic/join_template.pt:99
 msgid "Password (confirm)"
 msgstr ""
 
 msgid "Password (confirm)"
 msgstr ""
 
@@ -753,7 +753,7 @@ msgid "Remember my name."
 msgstr ""
 
 #: n/skins/custom_generic/login_form.pt:43
 msgstr ""
 
 #: n/skins/custom_generic/login_form.pt:43
-#: n/skins/generic/password_reset_form.py:26
+#: n/skins/generic/password_reset_form.py:25
 msgid " Login "
 msgstr ""
 
 msgid " Login "
 msgstr ""
 
@@ -1463,34 +1463,56 @@ msgstr ""
 msgid "Exit boxes editing"
 msgstr ""
 
 msgid "Exit boxes editing"
 msgstr ""
 
-#: n/skins/generic/password_reset_form.py:30
+#: n/skins/generic/password_reset_form.py:29
 msgid "Update Password"
 msgstr ""
 
 msgid "Update Password"
 msgstr ""
 
-#: n/skins/generic/password_reset_mail.py:4
+#: n/skins/generic/password_reset_mail.py:5
 msgid "Hi %(fullName)s,"
 msgstr ""
 
 msgid "Hi %(fullName)s,"
 msgstr ""
 
-#: n/skins/generic/password_reset_mail.py:6
+#: n/skins/generic/password_reset_mail.py:8
 msgid "You recently asked to reset your password."
 msgstr ""
 
 msgid "You recently asked to reset your password."
 msgstr ""
 
-#: n/skins/generic/password_reset_mail.py:8
+#: n/skins/generic/password_reset_mail.py:10
 msgid "To get back into your account on the %(siteName)s website, you'll need to create a new password."
 msgstr ""
 
 msgid "To get back into your account on the %(siteName)s website, you'll need to create a new password."
 msgstr ""
 
-#: n/skins/generic/password_reset_mail.py:9
+#: n/skins/generic/password_reset_mail.py:11
+#: n/skins/generic/password_reset_mail.py:18
 msgid "It's easy:"
 msgstr ""
 
 msgid "It's easy:"
 msgstr ""
 
-#: n/skins/generic/password_reset_mail.py:10
+#: n/skins/generic/password_reset_mail.py:12
+#: n/skins/generic/password_reset_mail.py:19
 msgid "Click the link below to open a browser window."
 msgstr ""
 
 msgid "Click the link below to open a browser window."
 msgstr ""
 
-#: n/skins/generic/password_reset_mail.py:11
+#: n/skins/generic/password_reset_mail.py:13
 msgid "Fill the form with your new password."
 msgstr ""
 
 msgid "Fill the form with your new password."
 msgstr ""
 
+#: n/skins/generic/password_reset_mail.py:16
+msgid "You just sign up on the %(siteName)s website."
+msgstr ""
+
+#: n/skins/generic/password_reset_mail.py:17
+msgid "Now you have to create your password to complete your registration."
+msgstr ""
+
+#: n/skins/generic/password_reset_mail.py:20
+msgid "Choose a password and enter it in the form."
+msgstr ""
+
+#: n/skins/generic/password_reset_mail.py:25
+msgid "Please note:"
+msgstr ""
+
+#: n/skins/generic/password_reset_mail.py:26
+msgid "Your personal login to sign in later is:"
+msgstr ""
+
 #: n/skins/generic/password_reset_template.pt:16
 msgid "Password resetting"
 msgstr ""
 #: n/skins/generic/password_reset_template.pt:16
 msgid "Password resetting"
 msgstr ""
index 0e07d03153d80b0da2508029c4efb0159c311175..d65c8efc1fc2e35009190ec8c5acf924ad465cfb 100644 (file)
@@ -24,34 +24,27 @@ form = context.REQUEST.form
 if add :
     if validate_email :
         password = confirm = rtool.generatePassword()
 if add :
     if validate_email :
         password = confirm = rtool.generatePassword()
+        ok = True
     else :
         ok = context.validatePassword(**form)
     else :
         ok = context.validatePassword(**form)
-    try :
-        if email_as_login :
-            member_id = member_email
-       rtool.addMember(id=member_id, password=password,
-                                       properties={'username': member_id,
-                                                               'given_name' : given_name,
-                                                               'name' : name,
-                                                               'email': member_email})
-        context.setStatus(True, _('Success!'))
-    except ValueError, errmsg:
-       context.setStatus(False, errmsg)
+    if ok :
+        try :
+            if email_as_login :
+                member_id = member_email
+               rtool.addMember(id=member_id, password=password,
+                                               properties={'username': member_id,
+                                                                       'given_name' : given_name,
+                                                                       'name' : name,
+                                                                       'email': member_email})
+            if validate_email :
+                rtool.requestPasswordReset(member_id, initial=True)
+            context.setStatus(True, _('Success!'))
+            is_newmember = True
+            is_anon = False
+        except ValueError, errmsg:
+               context.setStatus(False, errmsg)
     
     
-        
-
-# if add and \
-#         context.validatePassword(**form) and \
-#         context.members_add_control(**form) and \
-#         context.setRedirect(atool, 'user/join', b_start=b_start, ajax=ajax):
-#     return
-
 options = {}
 options = {}
-
-if context.REQUEST.get('portal_status_message', '') == 'Success!':
-       is_anon = False
-       is_newmember = True
-
 options['member_id'] = member_id
 options['given_name'] = given_name
 options['name'] = name
 options['member_id'] = member_id
 options['given_name'] = given_name
 options['name'] = name
@@ -60,6 +53,7 @@ options['password'] = is_newmember and context.REQUEST.get('password', '') or ''
 options['portal_url'] = portal_url
 options['isAnon'] = is_anon
 options['isNewMember'] = is_newmember
 options['portal_url'] = portal_url
 options['isAnon'] = is_anon
 options['isNewMember'] = is_newmember
+options['isOrdinaryMember'] = not (mtool.isAnonymousUser() or is_newmember)
 options['validate_email'] = validate_email
 options['isAnonRegistration'] = rtool.getMode() == MODE_ANONYMOUS
 options['isReviewedRegistration'] = rtool.getMode() == MODE_REVIEWED
 options['validate_email'] = validate_email
 options['isAnonRegistration'] = rtool.getMode() == MODE_ANONYMOUS
 options['isReviewedRegistration'] = rtool.getMode() == MODE_REVIEWED
index 337aa940c2a7f4512f6e638881c0430577fd00cb..3434f5681c0aa7d072f14a5a71748dd3ebd2a74f 100644 (file)
@@ -11,7 +11,7 @@
                 tal:define="form options/form">
       <h1 i18n:translate="">Become a member</h1>
       <div class="Desktop">
                 tal:define="form options/form">
       <h1 i18n:translate="">Become a member</h1>
       <div class="Desktop">
-        <p tal:condition="not:options/isAnon" i18n:translate="">
+        <p tal:condition="options/isOrdinaryMember" i18n:translate="">
             You are already authenticated. You may use the
             <a tal:attributes="href string:$portal_url/personalize_form"
                i18n:name="personalize_form"
             You are already authenticated. You may use the
             <a tal:attributes="href string:$portal_url/personalize_form"
                i18n:name="personalize_form"
@@ -22,8 +22,8 @@
         <div tal:condition="python:options['isNewMember'] and options['isAnonRegistration']">
           <p i18n:translate="">You have been registered as a member.</p>
           <p tal:condition="options/validate_email" i18n:translate="">
         <div tal:condition="python:options['isNewMember'] and options['isAnonRegistration']">
           <p i18n:translate="">You have been registered as a member.</p>
           <p tal:condition="options/validate_email" i18n:translate="">
-            You will receive an email shortly containing your password and
-            instructions on how to activate your membership.
+            You will receive an email shortly. Please follow sent instructions
+            to complete your registration.
           </p>
           <tal:case tal:condition="not: options/validate_email">
             <p i18n:translate="">Click the button to log in immediately.</p>
           </p>
           <tal:case tal:condition="not: options/validate_email">
             <p i18n:translate="">Click the button to log in immediately.</p>
index eaa2eb76e10cbc05896a882d3d59ac8fce7edf29..9cb4b1deccde9d3213bbe4fb562a51d74f67511f 100644 (file)
@@ -9,8 +9,7 @@ uuid = traverse_subpath[0]
 
 passwordChanged = False
 
 
 passwordChanged = False
 
-if validate and \
-    context.validatePassword(**form) :
+if validate :
     userid = context.reset_password_control(uuid=uuid, **form)
     if userid :
         passwordChanged = True
     userid = context.reset_password_control(uuid=uuid, **form)
     if userid :
         passwordChanged = True
index 7a9ab12d46280cc18620a09ad0f0b1fba962b47f..97177403074276c54fdc1685998d0a0b3c6afb67 100644 (file)
@@ -1,15 +1,29 @@
 ##parameters=options={}
 from Products.Plinn.utils import translate as _
 
 ##parameters=options={}
 from Products.Plinn.utils import translate as _
 
+
 print _('Hi %(fullName)s,')
 print
 print _('Hi %(fullName)s,')
 print
-print _('You recently asked to reset your password.')
+if not options.get('initial') :
+    print _('You recently asked to reset your password.')
 
 
-print _("To get back into your account on the %(siteName)s website, you'll need to create a new password.")
-print _("It's easy:")
-print '— %s' % _("Click the link below to open a browser window.")
-print '— %s' % _("Fill the form with your new password.")
-print
+    print _("To get back into your account on the %(siteName)s website, you'll need to create a new password.")
+    print _("It's easy:")
+    print '— %s' % _("Click the link below to open a browser window.")
+    print '— %s' % _("Fill the form with your new password.")
+    print
+else :
+    print _('You just sign up on the %(siteName)s website.')
+    print _('Now you have to create your password to complete your registration.')
+    print _("It's easy:")
+    print '— %s' % _("Click the link below to open a browser window.")
+    print '— %s' % _("Choose a password and enter it in the form.")
 print '%(resetPasswordUrl)s'
 
 print '%(resetPasswordUrl)s'
 
+if options['loginIsNotEmail'] :
+    print
+    print _("Please note:")
+    print _("Your personal login to sign in later is:")
+    print "%(member_id)s"
+
 return printed % options
\ No newline at end of file
 return printed % options
\ No newline at end of file