From: Benoît Pin Date: Wed, 15 Apr 2015 16:04:22 +0000 (+0200) Subject: Modernisation du formulaire d'inscription (en cours). X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/5f7755b09cb6a2fc49f46dc26b0990cd5ff6204b Modernisation du formulaire d'inscription (en cours). --- diff --git a/Products/Plinn/skins/custom_generic/join_form.py b/Products/Plinn/skins/custom_generic/join_form.py index 1513e25..579a38f 100644 --- a/Products/Plinn/skins/custom_generic/join_form.py +++ b/Products/Plinn/skins/custom_generic/join_form.py @@ -1,8 +1,11 @@ -##parameters=b_start=0, member_id='', given_name='', name='', member_email='', password='', confirm='', send_password='', add='', cancel='', ajax='' +##parameters=b_start=0, member_id='', given_name='', name='', member_email='', password='', confirm='', send_password='', add='', ajax='' ## from Products.CMFCore.utils import getToolByName from Products.CMFDefault.permissions import ManageUsers from Products.Plinn.RegistrationTool import MODE_ANONYMOUS, MODE_REVIEWED +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') @@ -22,10 +25,6 @@ if add and \ context.members_add_control(**form) and \ context.setRedirect(atool, 'user/join', b_start=b_start, ajax=ajax): return -elif cancel and \ - context.setRedirect(mtool, 'global/manage_members', b_start=b_start, ajax=ajax): - return - options = {} @@ -33,7 +32,6 @@ if context.REQUEST.get('portal_status_message', '') == 'Success!': is_anon = False is_newmember = True -options['title'] = is_usermanager and 'Register Member' or 'Become a Member' options['member_id'] = member_id options['given_name'] = given_name options['name'] = name @@ -55,8 +53,7 @@ if is_newmember: buttons.append( {'name': 'login', 'value': 'Log in'} ) else: target = atool.getActionInfo('user/join')['url'] - buttons.append( {'name': 'add', 'value': 'Register'} ) - buttons.append( {'name': 'cancel', 'value': 'Cancel'} ) + buttons.append( {'name': 'add', 'value': _('Join')} ) options['form'] = { 'action': target, 'listButtonInfos': tuple(buttons) } options['ajax']=ajax diff --git a/Products/Plinn/skins/custom_generic/join_template.pt b/Products/Plinn/skins/custom_generic/join_template.pt index f681d76..aa53178 100644 --- a/Products/Plinn/skins/custom_generic/join_template.pt +++ b/Products/Plinn/skins/custom_generic/join_template.pt @@ -9,16 +9,17 @@ -

Become a member

+

Become a member

- -

- You are already a member. You may use the personalization form to change your - membership information. -

-
- +

+ You are already authenticated. You may use the + personalization form + to change your personal informations. +

+ +

You have been registered as a member.

You will receive an email shortly containing your password and @@ -33,8 +34,9 @@ - - +

+ +

Your registration request has been taken into account.

Your request will be reviewed soon by a portal administrator. You @@ -49,85 +51,65 @@

Return to homepage

- - -

- Becoming a member gives you the ability to personalize the site and - participate in the community. -

-

- It does not cost any money to become a member and your email and - other personal information will remain private. -

-

- 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. -

-
- -
- + + +
+ +
- - - - - - - - - - - - - + - - - - - + - -
Member ID - +
First name - +
Last name - + + +
Email Address - + +
Password - -
Password (confirm) - + +
Mail Password? - - - - + +
-
-
+
-
+
+