4ac140b70ca47b2586080417180aeeb09d628abc
[Plinn.git] / Products / Plinn / skins / custom_generic / join_template.pt
1 <html xmlns:tal="http://xml.zope.org/namespaces/tal"
2 xmlns:metal="http://xml.zope.org/namespaces/metal"
3 xmlns:i18n="http://xml.zope.org/namespaces/i18n"
4 metal:use-macro="context/main_template/macros/master">
5 <head>
6 <meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
7 </head>
8 <body>
9 <metal:slot metal:fill-slot="main_no_tabs"
10 i18n:domain="plinn"
11 tal:define="form options/form">
12 <h1 i18n:translate="">Become a member</h1>
13 <div class="Desktop">
14 <p tal:condition="options/isOrdinaryMember" i18n:translate="">
15 You are already authenticated. You may use the
16 <a tal:attributes="href string:$portal_url/personalize_form"
17 i18n:name="personalize_form"
18 i18n:translate="">personalization form</a>
19 to change your personal informations.
20 </p>
21
22 <div tal:condition="python:options['isNewMember'] and options['isAnonRegistration']">
23 <p i18n:translate="">You have been registered as a member.</p>
24 <p tal:condition="options/validate_email" i18n:translate="">
25 You will receive an email shortly. Please follow sent instructions
26 to complete your registration.
27 </p>
28 <tal:case tal:condition="not: options/validate_email">
29 <p i18n:translate="">Click the button to log in immediately.</p>
30 <form tal:attributes="action form/action">
31 <input type="hidden" name="__ac_name" tal:attributes="value options/member_id"/>
32 <input type="hidden" name="__ac_password" tal:attributes="value options/password"/>
33 <input type="hidden" name="noAjax" value="1"/>
34 <metal:macro metal:use-macro="context/form_widgets/macros/buttons"/>
35 </form>
36 </tal:case>
37 </div>
38
39 <div tal:condition="python:options['isNewMember'] and options['isReviewedRegistration']">
40 <p i18n:translate="">Your registration request has been taken into account.</p>
41 <p tal:condition="options/validate_email" i18n:translate="">
42 Your request will be reviewed soon by a portal administrator. You
43 will receive an email containing your password and instructions on
44 how to activate your membership when your registration will be
45 approved.
46 </p>
47 <p tal:condition="not:options/validate_email" i18n:translate="">
48 Your request will be reviewed soon by a portal administrator. You
49 will receive an email when your registration will be approved.
50 </p>
51 <p>
52 <a href="" tal:attributes="href options/portal_url" i18n:translate="">Return to homepage</a>
53 </p>
54 </div>
55
56 <div tal:condition="options/isAnon">
57 <form method="post" tal:attributes="action form/action" id="registration-form">
58 <table>
59 <tr>
60 <td>
61 <input type="text" name="given_name" size="30"
62 placeholder="First name" i18n:attributes="placeholder"
63 tal:attributes="value options/given_name|nothing"/>
64 </td>
65 <td>
66 <input type="text" name="name" size="30"
67 placeholder="Last name" i18n:attributes="placeholder"
68 tal:attributes="value options/name|nothing"/>
69 </td>
70 </tr>
71 <tr>
72 <td colspan="2">
73 <input type="text" name="member_email"
74 placeholder="Email address" i18n:attributes="placeholder"
75 tal:attributes="value options/member_email|nothing"/>
76 <label>
77 <input type="checkbox" name="email_as_login" value="email_as_login"
78 tal:attributes="checked python:options['email_as_login']"/>
79 <span tal:omit-tag="" i18n:translate="">use as login</span>
80 </label>
81 </td>
82 </tr>
83 <tr id="login-row"
84 tal:attributes="class python:'hidden' if options['email_as_login'] else nothing">
85 <td colspan="2">
86 <input type="text" name="member_id"
87 placeholder="login" i18n:attributes="placeholder"
88 tal:attributes="value options/member_id|nothing"/>
89 </td>
90 </tr>
91 <tbody tal:condition="not: options/validate_email" tal:omit-tag="">
92 <tr>
93 <td colspan="2">
94 <input type="password" name="password"
95 placeholder="Password" i18n:attributes="placeholder"/>
96 </td>
97 </tr>
98 <tr>
99 <td colspan="2">
100 <input type="password" name="confirm"
101 placeholder="Password (confirm)" i18n:attributes="placeholder"/>
102 </td>
103 </tr>
104 </tbody>
105 <tr>
106 <td colspan="2">
107 <metal:macro metal:use-macro="context/form_widgets/macros/buttons"/>
108 </td>
109 </tr>
110 </table>
111 </form>
112 <script type="text/javascript">
113 (function(){
114 var login_row = document.getElementById('login-row');
115 var form = document.getElementById('registration-form');
116 var cb = form.elements.namedItem('email_as_login');
117 addListener(cb,
118 'change',
119 function(){
120 if (cb.checked)
121 login_row.className = 'hidden';
122 else
123 login_row.className = null;
124 }
125 );
126 }());
127 </script>
128 </div>
129
130 </div>
131 </metal:slot>
132 </body>
133 </html>