finish_registration_page

NAML documentation   Watch a video
   Usages of this macro
... in finish_registration_page.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<override_macro name="finish_registration_page" requires="servlet">
    <n.html
Macro
Parameters: head, body
>
        <head>
            <n.title
Macro
Parameters: text
.><t>Registration Confirmed</t></n.title.>
        </head>
        <body>
            <n.set_local_user
Macro
Parameters: user
.get_user_from_email
Binary
Namespace: NabbleNamespace
Parameters: do, email
 email="[n.email_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]" />
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.both
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.not
Binary
Namespace: BasicNamespace
Parameters: condition
.is_null
Binary
Namespace: BasicNamespace
Parameters: value
.local_user
Macro
Parameters: do
/]" condition2="[n.local_user
Macro
Parameters: do
.is_registered
Binary
Namespace: UserNamespace
/]">
                <then>
                    <h1><t>Registration Confirmed</t></h1>
                    <p><t>You have already been registered.</t></p>
                    <p>Here is a link to <a href="[n.local_user
Macro
Parameters: do
.url
Macro
Requires: user
Parameters: filter, index_record
/]">your profile</a>.</p>
                </then>
                <else>
                    <n.save_registration
Macro
/>
                </else>
            </n.if.both>
        </body>
    </n.html>
</override_macro>
Overrides default macro
... in register.naml
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<macro name="finish_registration_page" requires="servlet">
    <n.html>
        <head>
            <n.title.><t>Registration Confirmed</t></n.title.>
        </head>
        <body>
            <n.set_local_user.get_user_from_email email="[n.email_field.value/]" />
            <n.if.both condition1="[n.not.is_null.local_user/]" condition2="[n.local_user.is_registered/]">
                <then>
                    <h1><t>Registration Confirmed</t></h1>
                    <p><t>You have already been registered.</t></p>
                </then>
                <else>
                    <n.save_registration/>
                </else>
            </n.if.both>
        </body>
    </n.html>
</macro>