save_registration

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "save_registration".
... in save_registration.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<override_macro name="save_registration">
    <n.catch_exception. id="save-block">
        <n.set_local_user.get_registration registration_key="[n.get_parameter name='key'/]" email="[n.email_field.value/]" />
        <n.if.is_null.local_user>
            <then>
                <h1><t>Registration Failed</t></h1>
                <p><t>Please make sure you are using the same browser that you used to fill in the registration request.</t></p>
                <p><t>You can try <n.register_link.>registering again</n.register_link.> or contact <n.support_link/>.</t></p>
            </then>
            <else>
                <n.local_user.register/>
                <n.set_var. name="next_url">
                    <n.get_next_url_from_registration registration_key="[n.get_parameter name='key'/]" />
                </n.set_var.>
 
                <h1><t>Registration Confirmed</t></h1>
                <p><t>You have been registered for the forum of the Tottenham Hotspur Supporters’ Trust.</t></p>
                <p><a href="[n.var name='next_url'/]"><t>Continue</t></a></p>
 
                <n.local_user.after_registration/>
            </else>
        </n.if.is_null.local_user>
    </n.catch_exception.>
    <n.if.has_exception for="save-block">
        <then>
            <h1><t>Registration Failed</t></h1>
            <br />
            <n.handle_exception. for="save-block">
                <n.comment.>
                    fill in as needed
                </n.comment.>
            </n.handle_exception.>
        </then>
    </n.if.has_exception>
</override_macro>
Overrides default macro
... in register.naml
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
<macro name="save_registration">
    <n.catch_exception. id="save-block">
        <n.set_local_user.get_registration registration_key="[n.get_parameter name='key'/]" email="[n.email_field.value/]" />
        <n.if.is_null.local_user>
            <then>
                <h1><t>Registration Failed</t></h1>
                <p><t>Please make sure you are using the same browser that you used to fill in the registration request.</t></p>
                <p><t>You can try <n.register_link.>registering again</n.register_link.> or contact <n.support_link/>.</t></p>
            </then>
            <else>
                <n.local_user.register/>
                <n.set_var. name="next_url">
                    <n.get_next_url_from_registration registration_key="[n.get_parameter name='key'/]" />
                </n.set_var.>
 
                <h1><t>Registration Confirmed</t></h1>
                <p><t>You have been registered to <t.subject.root_node.subject/>.</t></p>
                <p><a href="[n.var name='next_url'/]"><t>Continue</t></a></p>
 
                <n.local_user.after_registration/>
            </else>
        </n.if.is_null.local_user>
    </n.catch_exception.>
    <n.if.has_exception for="save-block">
        <then>
            <h1><t>Registration Failed</t></h1>
            <br />
            <n.handle_exception. for="save-block">
                <n.comment.>
                    fill in as needed
                </n.comment.>
            </n.handle_exception.>
        </then>
    </n.if.has_exception>
</macro>