0
|
1 <macro name="start_registration_page" requires="servlet">
|
|
2 <n.if.is_submitted_form>
|
|
3 <then.process_registration/>
|
|
4 </n.if.is_submitted_form>
|
|
5
|
|
6 <n.html>
|
|
7 <head>
|
|
8 <n.title.><t>Register to <t.app.root_node.subject/></t></n.title.>
|
|
9 <n.registration_stylesheet/>
|
|
10 </head>
|
|
11 <body>
|
|
12 <div class="center-content">
|
|
13 <h1 class="weak-color"><t>Register</t></h1>
|
|
14 <span class="second-font shaded-bg-color rounded big-title" style="padding:.2em .7em">
|
|
15 <n.root_node.subject/>
|
|
16 </span>
|
|
17
|
|
18 <n.handle_registration_errors/>
|
|
19
|
|
20 <n.form.>
|
|
21 <n.nextUrl_field.hidden/>
|
|
22 <div style="text-align:left;margin:0 auto">
|
|
23 <n.registration_fields/>
|
|
24 <div class="weak-color" style="margin-top:1em;text-align:center;">
|
|
25 <input type="submit" class="toolbar action-button" value="[t]Register Now[/t]"/>
|
|
26 </div>
|
|
27 </div>
|
|
28 </n.form.>
|
|
29 </div>
|
|
30 </body>
|
|
31 </n.html>
|
|
32 </macro>
|
|
33
|
|
34 <macro name="registration_stylesheet">
|
|
35 <style type="text/css">
|
|
36 body { text-align:center; }
|
|
37 div.center-content { margin:0px auto; margin-bottom: 3em; }
|
|
38 table.field-table { margin:1em auto; border-collapse:collapse; }
|
|
39 table.field-table td { vertical-align:middle; }
|
|
40 td.column1 {
|
|
41 text-align:right;
|
|
42 width:7em;
|
|
43 white-space:nowrap;
|
|
44 padding-right:.3em;
|
|
45 }
|
|
46 input[type=text],input[type=password] { padding:.4em 0; }
|
|
47 div.field-title { margin-top:.1em; white-space:nowrap; }
|
|
48 div.field-title { margin-top:.1em; white-space:nowrap; }
|
|
49 .important { font-weight:bold }
|
|
50 #nabble-captcha { vertical-align:-.8em }
|
|
51 </style>
|
|
52 </macro>
|
|
53
|
|
54 <macro name="process_registration">
|
|
55 <n.catch_exception. id="save-block">
|
|
56 <n.validate_registration_form/>
|
|
57 <n.check_captcha/>
|
|
58
|
|
59 <n.registration>
|
|
60 <user_name><n.user_name_field.value/></user_name>
|
|
61 <email><n.email_field.value/></email>
|
|
62 <password><n.password_field.value/></password>
|
|
63 <next_url><n.nextUrl_field.value/></next_url>
|
|
64 <do>
|
|
65 <n.send_registration_email
|
|
66 email="[n.email_field.value/]"
|
|
67 next_url="[n.nextUrl_field.value/]"
|
|
68 key="[n.key/]"
|
|
69 />
|
|
70 <n.redirect_to.registering_page_path/>
|
|
71 </do>
|
|
72 </n.registration>
|
|
73 </n.catch_exception.>
|
|
74 </macro>
|
|
75
|
|
76 <macro name="handle_registration_errors">
|
|
77 <n.if.is_submitted_form>
|
|
78 <then>
|
|
79 <n.if.has_exception for="save-block">
|
|
80 <then>
|
|
81 <n.handle_exception. for="save-block">
|
|
82 <div class="error-message important" style="margin:1em;padding:.5em 0">
|
|
83 <n.exception. name="user_already_registered">
|
|
84 <t>You have already been registered.</t>
|
|
85 <a href="[n.forgot_password_path/]"><t>Forgot your password?</t></a>
|
|
86 </n.exception.>
|
|
87 <n.exception. name="invalid_recaptcha">
|
|
88 <t>Please verify that you are not a robot.</t>
|
|
89 </n.exception.>
|
|
90 <n.exception. name="empty_registration_field">
|
|
91 <t>You must fill in all fields below.</t>
|
|
92 </n.exception.>
|
|
93 <n.exception. name="must_accept_terms_of_use">
|
|
94 <t>You must agree to the Terms of Use.</t>
|
|
95 </n.exception.>
|
|
96 <n.exception. name="invalid_email">
|
|
97 <t>Enter a valid email address.</t>
|
|
98 </n.exception.>
|
|
99 <n.exception. name="passwords_dont_match">
|
|
100 <t>The password fields don't match.</t>
|
|
101 </n.exception.>
|
|
102 <n.exception. name="user_name_already_in_use">
|
|
103 <t>This user name is already in use.</t>
|
|
104 </n.exception.>
|
|
105 </div>
|
|
106 </n.handle_exception.>
|
|
107 </then>
|
|
108 </n.if.has_exception>
|
|
109 </then>
|
|
110 </n.if.is_submitted_form>
|
|
111 </macro>
|
|
112
|
|
113 <macro name="registration_fields">
|
|
114 <table class="field-table">
|
|
115 <tr>
|
|
116 <td class="column1"><div class="second-font field-title"><t>User Name</t></div></td>
|
|
117 <td>
|
|
118 <n.user_name_field.input type="text" size="35" maxlength="30"/>
|
|
119 <n.user_name_field.highlight_if_empty/>
|
|
120 </td>
|
|
121 </tr>
|
|
122 <tr>
|
|
123 <td class="column1"><div class="second-font field-title"><t>Email</t></div></td>
|
|
124 <td>
|
|
125 <n.email_field.input type="text" size="35" maxlength="60"/>
|
|
126 <n.email_field.highlight_if_empty/>
|
|
127 </td>
|
|
128 </tr>
|
|
129 <tr>
|
|
130 <td></td>
|
|
131 <td class="weak-color" style="margin-top:1em;font-size:80%;padding-bottom:1em">
|
|
132 <t>You will receive an email with a link to activate your account.</t>
|
|
133 </td>
|
|
134 </tr>
|
|
135 <tr>
|
|
136 <td class="column1"><div class="second-font field-title"><t>Password</t></div></td>
|
|
137 <td>
|
|
138 <n.password_field.input type="password" size="15" maxlength="15"/>
|
|
139 <n.password_field.highlight_if_empty/>
|
|
140 </td>
|
|
141 </tr>
|
|
142 <tr>
|
|
143 <td class="column1"><div class="second-font field-title"><t>Confirm Password</t></div></td>
|
|
144 <td>
|
|
145 <n.password2_field.input type="password" size="15" maxlength="15"/>
|
|
146 <n.password2_field.highlight_if_empty/>
|
|
147 </td>
|
|
148 </tr>
|
|
149 <tr>
|
|
150 <td class="column1" style="padding-top:.5em">
|
|
151 <n.accept_terms_field.checkbox/>
|
|
152 </td>
|
|
153 <td class="nowrap" style="padding-top:.5em">
|
|
154 <label for="accept_terms"><t>I have read and I agree to Nabble's <n.terms_link.>Terms of Use</n.terms_link.>.</t></label>
|
|
155 </td>
|
|
156 </tr>
|
|
157 <tr>
|
|
158 <td></td>
|
|
159 <td style="padding-top:.5em">
|
|
160 <n.captcha_control/>
|
|
161 </td>
|
|
162 </tr>
|
|
163 </table>
|
|
164 </macro>
|
|
165
|
|
166 <macro name="validate_registration_form">
|
|
167 <n.user_name_field.notify_if_empty/>
|
|
168 <n.email_field.notify_if_empty/>
|
|
169 <n.password_field.notify_if_empty/>
|
|
170 <n.password2_field.notify_if_empty/>
|
|
171
|
|
172 <n.if.not.equal value1="[n.password_field.value/]" value2="[n.password2_field.value/]">
|
|
173 <then.throw_template_exception name="passwords_dont_match"/>
|
|
174 </n.if.not.equal>
|
|
175
|
|
176 <n.if.not.accept_terms_field.is_checked>
|
|
177 <then.throw_template_exception name="must_accept_terms_of_use"/>
|
|
178 </n.if.not.accept_terms_field.is_checked>
|
|
179 </macro>
|
|
180
|
|
181 <macro name="notify_if_empty" requires="field">
|
|
182 <n.if.is_empty.value>
|
|
183 <then.throw_template_exception name="empty_registration_field"/>
|
|
184 </n.if.is_empty.value>
|
|
185 </macro>
|
|
186
|
|
187 <macro name="highlight_if_empty" requires="field">
|
|
188 <n.if.both condition1="[n.is_submitted_form/]" condition2="[n.is_empty.value/]">
|
|
189 <then><span class="important"><t>required</t></span></then>
|
|
190 </n.if.both>
|
|
191 </macro>
|
|
192
|
|
193 <macro name="accept_terms_field" dot_parameter="do">
|
|
194 <n.field. name="accept_terms"><n.do/></n.field.>
|
|
195 </macro>
|
|
196
|
|
197 <macro name="user_name_field" dot_parameter="do">
|
|
198 <n.field. name="user_name"><n.do/></n.field.>
|
|
199 </macro>
|
|
200
|
|
201 <macro name="password2_field" dot_parameter="do">
|
|
202 <n.field. name="password2"><n.do/></n.field.>
|
|
203 </macro>
|
|
204
|
|
205 <macro name="registering_page" requires="servlet">
|
|
206 <n.html>
|
|
207 <head>
|
|
208 <n.title.><t>Registering...</t></n.title.>
|
|
209 <style type="text/css">
|
|
210 body { text-align:center; }
|
|
211 div.center-content { margin:0px auto; margin-bottom: 3em; }
|
|
212 </style>
|
|
213 </head>
|
|
214 <body>
|
|
215 <div class="center-content">
|
|
216 <h1 class="weak-color"><t>Registering...</t></h1>
|
|
217 <p><t>An email has been sent to you.</t></p>
|
|
218 <p><t>Please follow the instructions in the email to complete the registration process.</t></p>
|
|
219 <n.show_email_warning/>
|
|
220 </div>
|
|
221 </body>
|
|
222 </n.html>
|
|
223 </macro>
|
|
224
|
|
225 <macro name="registering_page_path">
|
|
226 <n.encode_url.>
|
|
227 /template/NamlServlet.jtp?macro=registering_page
|
|
228 </n.encode_url.>
|
|
229 </macro>
|
|
230
|
|
231 <macro name="show_email_warning" requires="servlet">
|
|
232 <div class="info-message" style="padding: .45em;margin: 1em 0">
|
|
233 <t>If you are not receiving emails from Nabble, please check your <b>spam</b> folder.</t>
|
|
234 </div>
|
|
235 </macro>
|
|
236
|
|
237
|
|
238 <macro name="finish_registration_page" requires="servlet">
|
|
239 <n.html>
|
|
240 <head>
|
|
241 <n.title.><t>Registration Confirmed</t></n.title.>
|
|
242 </head>
|
|
243 <body>
|
|
244 <n.set_local_user.get_user_from_email email="[n.email_field.value/]" />
|
|
245 <n.if.both condition1="[n.not.is_null.local_user/]" condition2="[n.local_user.is_registered/]">
|
|
246 <then>
|
|
247 <h1><t>Registration Confirmed</t></h1>
|
|
248 <p><t>You have already been registered.</t></p>
|
|
249 </then>
|
|
250 <else>
|
|
251 <n.save_registration/>
|
|
252 </else>
|
|
253 </n.if.both>
|
|
254 </body>
|
|
255 </n.html>
|
|
256 </macro>
|
|
257
|
|
258 <macro name="save_registration">
|
|
259 <n.catch_exception. id="save-block">
|
|
260 <n.set_local_user.get_registration registration_key="[n.get_parameter name='key'/]" email="[n.email_field.value/]" />
|
|
261 <n.if.is_null.local_user>
|
|
262 <then>
|
|
263 <h1><t>Registration Failed</t></h1>
|
|
264 <p><t>Please make sure you are using the same browser that you used to fill in the registration request.</t></p>
|
|
265 <p><t>You can try <n.register_link.>registering again</n.register_link.> or contact <n.support_link/>.</t></p>
|
|
266 </then>
|
|
267 <else>
|
|
268 <n.local_user.register/>
|
|
269 <n.set_var. name="next_url">
|
|
270 <n.get_next_url_from_registration registration_key="[n.get_parameter name='key'/]" />
|
|
271 </n.set_var.>
|
|
272
|
|
273 <h1><t>Registration Confirmed</t></h1>
|
|
274 <p><t>You have been registered to <t.subject.root_node.subject/>.</t></p>
|
|
275 <p><a href="[n.var name='next_url'/]"><t>Continue</t></a></p>
|
|
276
|
|
277 <n.local_user.after_registration/>
|
|
278 </else>
|
|
279 </n.if.is_null.local_user>
|
|
280 </n.catch_exception.>
|
|
281 <n.if.has_exception for="save-block">
|
|
282 <then>
|
|
283 <h1><t>Registration Failed</t></h1>
|
|
284 <br />
|
|
285 <n.handle_exception. for="save-block">
|
|
286 <n.comment.>
|
|
287 fill in as needed
|
|
288 </n.comment.>
|
|
289 </n.handle_exception.>
|
|
290 </then>
|
|
291 </n.if.has_exception>
|
|
292 </macro>
|
|
293
|
|
294 <macro name="after_registration" requires="user">
|
|
295 <n.comment.>To be overridden</n.comment.>
|
|
296 </macro>
|
|
297
|
|
298 <macro name="send_registration_email" parameters="email, next_url, key" unindent="true">
|
|
299 <n.set_var. name='confirm_url'>
|
|
300 <n.remove_spaces.>
|
|
301 <n.base_url/>
|
|
302 <n.encode_url.>
|
|
303 /template/NamlServlet.jtp?macro=finish_registration_page
|
|
304 &email=<n.email/>
|
|
305 &key=<n.key/>
|
|
306 &date=<n.now.raw_time/>
|
|
307 </n.encode_url.>
|
|
308 </n.remove_spaces.>
|
|
309 </n.set_var.>
|
|
310 <n.new_email.>
|
|
311 <n.send>
|
|
312 <to><n.email/></to>
|
|
313 <subject><t><t.app.root_node.subject/> Registration</t></subject>
|
|
314 <text_part>
|
|
315 <t>Dear user,</t>
|
|
316
|
|
317 <t>Thank you for registering with <t.app.root_node.subject/>!</t>
|
|
318
|
|
319 *<t>Email Confirmation</t>*
|
|
320 <t>Please click on the confirmation link below to activate your account:</t>
|
|
321
|
|
322 <n.var name='confirm_url'/>
|
|
323
|
|
324 <t>If you didn't request this email or have no idea why you received it, please ignore it. It might have been a mistake from someone else.</t>
|
|
325
|
|
326 <t>Sincerely,</t>
|
|
327 <n.root_node.subject/>
|
|
328 <n.base_url/>
|
|
329 </text_part>
|
|
330 <aol_part>
|
|
331 <t>Dear user,</t>
|
|
332
|
|
333 <t>Thank you for registering with <t.app.root_node.subject/>!</t>
|
|
334
|
|
335 *<t>Email Confirmation</t>*
|
|
336 <t>Please click on the confirmation link below to activate your account:</t>
|
|
337
|
|
338 <n.var name='confirm_url'/>
|
|
339
|
|
340 <t>If you didn't request this email or have no idea why you received it, please ignore it. It might have been a mistake from someone else.</t>
|
|
341
|
|
342 <t>Sincerely,</t>
|
|
343 <n.root_node.subject/>
|
|
344 <n.base_url/>
|
|
345 </aol_part>
|
|
346 <html_part>
|
|
347 <t>Dear user,</t><br/>
|
|
348 <br/>
|
|
349 <t>Thank you for registering with <t.app.root_node.subject/>!</t><br/>
|
|
350 <br/>
|
|
351 <div style="font-weight:bold;margin-bottom:.25em">
|
|
352 <t>Email Confirmation</t>
|
|
353 </div>
|
|
354 <t>Please click on the confirmation link below to activate your account:</t>
|
|
355 <div style="background-color:#FFFADB;border:#EDDD79 solid 1px;margin:1.2em 0;padding:.5em">
|
|
356 <a href="[n.var name='confirm_url'/]"><n.var name='confirm_url'/></a>
|
|
357 </div>
|
|
358 <div style="margin:.3em 0 1.2em">
|
|
359 <t>If you didn't request this email or have no idea why you received it, please ignore it.
|
|
360 It might have been a mistake from someone else.</t>
|
|
361 </div>
|
|
362 <t>Sincerely,</t><br/>
|
|
363 <n.root_node.subject/><br/>
|
|
364 <a href="[n.base_url/]"><n.base_url/></a>
|
|
365 <div style="margin:1.5em 0;color:#666666;font: 11px tahoma,geneva,helvetica,arial,sans-serif;">
|
|
366 <n.macro_viewer_email_link macro="send_registration_email"/>
|
|
367 </div>
|
|
368 </html_part>
|
|
369 </n.send>
|
|
370 </n.new_email.>
|
|
371 </macro>
|