eb33650d0f7203a0a56f9888243142430da15636
[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" method="post">
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="came_from" tal:attributes="value options/came_from">
34 <input type="hidden" name="noAjax" value="1"/>
35 <metal:macro metal:use-macro="context/form_widgets/macros/buttons"/>
36 </form>
37 </tal:case>
38 </div>
39
40 <div tal:condition="python:options['isNewMember'] and options['isReviewedRegistration']">
41 <p i18n:translate="">Your registration request has been taken into account.</p>
42 <p tal:condition="options/validate_email" i18n:translate="">
43 Your request will be reviewed soon by a portal administrator. You
44 will receive an email containing your password and instructions on
45 how to activate your membership when your registration will be
46 approved.
47 </p>
48 <p tal:condition="not:options/validate_email" i18n:translate="">
49 Your request will be reviewed soon by a portal administrator. You
50 will receive an email when your registration will be approved.
51 </p>
52 <p>
53 <a href="" tal:attributes="href options/portal_url" i18n:translate="">Return to homepage</a>
54 </p>
55 </div>
56
57 <div tal:condition="options/isAnon">
58 <form method="post" tal:attributes="action form/action" id="registration-form">
59 <table>
60 <tr>
61 <td>
62 <input type="text" name="given_name" size="30"
63 placeholder="First name" i18n:attributes="placeholder"
64 tal:attributes="value options/given_name|nothing"/>
65 </td>
66 <td>
67 <input type="text" name="name" size="30"
68 placeholder="Last name" i18n:attributes="placeholder"
69 tal:attributes="value options/name|nothing"/>
70 </td>
71 </tr>
72 <tr>
73 <td colspan="2">
74 <input type="text" name="member_email" size="30"
75 placeholder="Email address" i18n:attributes="placeholder"
76 tal:attributes="value options/member_email|nothing"/>
77 <label>
78 <input type="checkbox" name="email_as_login" value="email_as_login"
79 tal:attributes="checked python:options['email_as_login']"/>
80 <span tal:omit-tag="" i18n:translate="">use as login</span>
81 </label>
82 </td>
83 </tr>
84 <tr id="login-row"
85 tal:attributes="class python:'hidden' if options['email_as_login'] else nothing">
86 <td colspan="2">
87 <input type="text" name="member_id"
88 placeholder="login" i18n:attributes="placeholder"
89 tal:attributes="value options/member_id|nothing"/>
90 </td>
91 </tr>
92 <tbody tal:condition="not: options/validate_email" tal:omit-tag="">
93 <tr>
94 <td colspan="2">
95 <input type="password" name="password" size="25"
96 placeholder="Password" i18n:attributes="placeholder"/>
97 </td>
98 </tr>
99 <tr>
100 <td colspan="2">
101 <input type="password" name="confirm" size="25"
102 placeholder="Password (confirm)" i18n:attributes="placeholder"/>
103 </td>
104 </tr>
105 </tbody>
106 <tr>
107 <td colspan="2">
108 <metal:macro metal:use-macro="context/form_widgets/macros/buttons"/>
109 </td>
110 </tr>
111 </table>
112 <input type="hidden" name="came_from"
113 tal:attributes="value options/came_from"/>
114 </form>
115 <script type="text/javascript">
116 (function(){
117 var login_row = document.getElementById('login-row');
118 var form = document.getElementById('registration-form');
119 var cb = form.elements.namedItem('email_as_login');
120 addListener(cb,
121 'change',
122 function(){
123 if (cb.checked)
124 login_row.className = 'hidden';
125 else
126 login_row.className = null;
127 }
128 );
129 }());
130 </script>
131 </div>
132
133 </div>
134 </metal:slot>
135 </body>
136 </html>