msgid ""
msgstr ""
"Project-Id-Version: 2.0 beta 1\n"
-"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n"
+"POT-Creation-Date: Thu Apr 16 18:57:18 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"
msgid "Please rename each listed object."
msgstr "Please rename each listed object."
-#: n/RegistrationTool.py:267
+#: n/RegistrationTool.py:266
msgid "Complete your registration on the %s website"
msgstr "Complete your registration on the %s website"
-#: n/RegistrationTool.py:269
+#: n/RegistrationTool.py:268
msgid "How to reset your password on the %s website"
msgstr "How to reset your password on the %s website"
-#: n/RegistrationTool.py:287
+#: n/RegistrationTool.py:286
msgid "Unknown user name. Please retry."
msgstr "Unknown user name. Please retry."
-#: n/RegistrationTool.py:302
+#: n/RegistrationTool.py:301
msgid "Invalid reset password request."
msgstr "Invalid reset password request."
-#: n/RegistrationTool.py:308
+#: n/RegistrationTool.py:307
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:317
+#: n/RegistrationTool.py:316
msgid "Password successfully updated."
msgstr "Password successfully updated."
-#: n/RegistrationTool.py:319
-msgid "\"%s\" username not found."
-msgstr "\"%s\" username not found."
+#: n/RegistrationTool.py:318
+msgid "\"${userid}\" username not found."
+msgstr "\"${userid}\" username not found."
#: n/profiles/default/workflows/default_workflow/scripts/sendNotificationEmail.py:52
#: n/profiles/default/workflows/folder_workflow/scripts/sendNotificationEmail.py:52
msgid "Success!"
msgstr "Success!"
-#: n/skins/custom_generic/join_form.py:67
+#: n/skins/custom_generic/join_form.py:68
#: n/skins/photo_theme/photo_main_macros.pt:28
msgid "Join"
msgstr "Join"
msgid "use as login"
msgstr "use as login"
-#: n/skins/custom_generic/join_template.pt:85
+#: n/skins/custom_generic/join_template.pt:86
msgid "login"
msgstr "login"
-#: n/skins/custom_generic/join_template.pt:93
+#: n/skins/custom_generic/join_template.pt:94
#: 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:99
+#: n/skins/custom_generic/join_template.pt:100
msgid "Password (confirm)"
msgstr "Password (confirm)"
msgid "Configure portal"
msgstr "Configure portal"
+#~ msgid "\"%s\" username not found."
+#~ msgstr "\"%s\" username not found."
+
#~ msgid "Your personal login to log in later is:"
#~ msgstr "Your personal login to log in later is:"
msgid ""
msgstr ""
"Project-Id-Version: Plinn 2.0\n"
-"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n"
+"POT-Creation-Date: Thu Apr 16 18:57:18 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"
msgid "Please rename each listed object."
msgstr "Veuillez renommer tous les éléments listés."
-#: n/RegistrationTool.py:267
+#: n/RegistrationTool.py:266
msgid "Complete your registration on the %s website"
msgstr "Terminer votre inscription sur le site %s"
-#: n/RegistrationTool.py:269
+#: n/RegistrationTool.py:268
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:287
+#: n/RegistrationTool.py:286
msgid "Unknown user name. Please retry."
msgstr "Nom d'utilisateur inconnu. Veuillez réessayer."
-#: n/RegistrationTool.py:302
+#: n/RegistrationTool.py:301
msgid "Invalid reset password request."
msgstr "Demande de réinitialisation de mot de passe invalide."
-#: n/RegistrationTool.py:308
+#: n/RegistrationTool.py:307
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:317
+#: n/RegistrationTool.py:316
msgid "Password successfully updated."
msgstr "Mot de passe correctement mis à jour."
-#: n/RegistrationTool.py:319
-msgid "\"%s\" username not found."
-msgstr "Nom : « %s » non trouvé."
+#: n/RegistrationTool.py:318
+msgid "\"${userid}\" username not found."
+msgstr "Identifiant « ${userid} » non trouvé."
#: n/profiles/default/workflows/default_workflow/scripts/sendNotificationEmail.py:52
#: n/profiles/default/workflows/folder_workflow/scripts/sendNotificationEmail.py:52
msgid "Success!"
msgstr "Succès !"
-#: n/skins/custom_generic/join_form.py:67
+#: n/skins/custom_generic/join_form.py:68
#: n/skins/photo_theme/photo_main_macros.pt:28
msgid "Join"
msgstr "S'inscrire"
msgid "use as login"
msgstr "utiliser comme identifiant"
-#: n/skins/custom_generic/join_template.pt:85
+#: n/skins/custom_generic/join_template.pt:86
msgid "login"
msgstr "identifiant"
-#: n/skins/custom_generic/join_template.pt:93
+#: n/skins/custom_generic/join_template.pt:94
#: 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:99
+#: n/skins/custom_generic/join_template.pt:100
msgid "Password (confirm)"
msgstr "Confirmation"
msgid "Configure portal"
msgstr "Configurer portail"
+#~ msgid "\"%s\" username not found."
+#~ msgstr "Nom : « %s » non trouvé."
+
#~ msgid ""
#~ "You will receive an email shortly containing your password and "
#~ "instructions on how to activate your membership."
msgid ""
msgstr ""
"Project-Id-Version: 2.0 beta 1\n"
-"POT-Creation-Date: Thu Apr 16 16:35:11 2015\n"
+"POT-Creation-Date: Thu Apr 16 18:57:18 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"
msgid "Please rename each listed object."
msgstr ""
-#: n/RegistrationTool.py:267
+#: n/RegistrationTool.py:266
msgid "Complete your registration on the %s website"
msgstr ""
-#: n/RegistrationTool.py:269
+#: n/RegistrationTool.py:268
msgid "How to reset your password on the %s website"
msgstr ""
-#: n/RegistrationTool.py:287
+#: n/RegistrationTool.py:286
msgid "Unknown user name. Please retry."
msgstr ""
-#: n/RegistrationTool.py:302
+#: n/RegistrationTool.py:301
msgid "Invalid reset password request."
msgstr ""
-#: n/RegistrationTool.py:308
+#: n/RegistrationTool.py:307
msgid "Your reset password request has expired. You can ask a new one."
msgstr ""
-#: n/RegistrationTool.py:317
+#: n/RegistrationTool.py:316
msgid "Password successfully updated."
msgstr ""
-#: n/RegistrationTool.py:319
-msgid "\"%s\" username not found."
+#: n/RegistrationTool.py:318
+msgid "\"${userid}\" username not found."
msgstr ""
#: n/profiles/default/workflows/default_workflow/scripts/sendNotificationEmail.py:52
msgid "Success!"
msgstr ""
-#: n/skins/custom_generic/join_form.py:67
+#: n/skins/custom_generic/join_form.py:68
#: n/skins/photo_theme/photo_main_macros.pt:28
msgid "Join"
msgstr ""
msgid "use as login"
msgstr ""
-#: n/skins/custom_generic/join_template.pt:85
+#: n/skins/custom_generic/join_template.pt:86
msgid "login"
msgstr ""
-#: n/skins/custom_generic/join_template.pt:93
+#: n/skins/custom_generic/join_template.pt:94
#: 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:99
+#: n/skins/custom_generic/join_template.pt:100
msgid "Password (confirm)"
msgstr ""
-##parameters=member_id='', given_name='', name='', member_email='', email_as_login='', password='', confirm='', add='', ajax=''
+##parameters=member_id='', given_name='', name='', member_email='', password='', confirm='', add='', ajax=''
##
from Products.CMFCore.utils import getToolByName
from Products.CMFDefault.permissions import ManageUsers
from Products.Plinn.utils import translate
def _(message) : return translate(message, context).encode('utf-8')
-
mtool = getToolByName(script, 'portal_membership')
ptool = getToolByName(script, 'portal_properties')
rtool = getToolByName(script, 'portal_registration')
is_newmember = False
is_usermanager = mtool.checkPermission(ManageUsers, mtool)
-
form = context.REQUEST.form
+email_as_login = bool(form.get('email_as_login', True if context.REQUEST.method == 'GET' else False))
if add :
if validate_email :
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})
+
+ 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)
+ context.setStatus(False, errmsg)
options = {}
options['member_id'] = member_id
options['given_name'] = given_name
options['name'] = name
options['member_email'] = member_email
+options['email_as_login'] = email_as_login
options['password'] = is_newmember and context.REQUEST.get('password', '') or ''
options['portal_url'] = portal_url
options['isAnon'] = is_anon
buttons = []
if is_newmember:
- target = atool.getActionInfo('user/logged_in')['url']
- buttons.append( {'name': 'login', 'value': 'Log in'} )
+ target = atool.getActionInfo('user/logged_in')['url']
+ buttons.append( {'name': 'login', 'value': 'Log in'} )
else:
- target = atool.getActionInfo('user/join')['url']
- buttons.append( {'name': 'add', 'value': _('Join')} )
+ target = atool.getActionInfo('user/join')['url']
+ buttons.append( {'name': 'add', 'value': _('Join')} )
options['form'] = { 'action': target,
- 'listButtonInfos': tuple(buttons) }
+ 'listButtonInfos': tuple(buttons) }
options['ajax']=ajax
return context.join_template(**options)
</div>
<div tal:condition="options/isAnon">
- <form method="post" tal:attributes="action form/action">
+ <form method="post" tal:attributes="action form/action" id="registration-form">
<table>
<tr>
<td>
tal:attributes="value options/member_email|nothing"/>
<label>
<input type="checkbox" name="email_as_login" value="email_as_login"
- tal:attributes="checked python:options.get('email_as_login', True)"/>
+ tal:attributes="checked python:options['email_as_login']"/>
<span tal:omit-tag="" i18n:translate="">use as login</span>
</label>
</td>
</tr>
- <tr>
+ <tr id="login-row"
+ tal:attributes="class python:'hidden' if options['email_as_login'] else nothing">
<td colspan="2">
<input type="text" name="member_id"
placeholder="login" i18n:attributes="placeholder"
</tr>
</table>
</form>
+ <script type="text/javascript">
+ (function(){
+ var login_row = document.getElementById('login-row');
+ var form = document.getElementById('registration-form');
+ var cb = form.elements.namedItem('email_as_login');
+ addListener(cb,
+ 'change',
+ function(){
+ if (cb.checked)
+ login_row.className = 'hidden';
+ else
+ login_row.className = null;
+ }
+ );
+ }());
+ </script>
</div>
</div>