save_registration.naml

<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>