save_field_values_user

NAML documentation   Watch a video
   Usages of this macro
... in subscribe_user.naml
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<macro name="save_field_values_user" requires="user">
    <n.set_local_user
Macro
Parameters: user
.this_user
Binary
Namespace: UserNamespace
Parameters: do
/>
    <n.set_local_subscription
Macro
Parameters: subscription
.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.subscription_for
Binary
Namespace: NodeNamespace
Parameters: do, email
 email="[n.local_user
Macro
Parameters: do
.user_email
Binary
Namespace: UserNamespace
/]" />
    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.equal
Binary
Namespace: BasicNamespace
Parameters: value2, value1
 value1="save-subscription" value2="[n.action_parameter
Macro
/]">
        <then>
            <n.local_subscription
Macro
Parameters: do
.save
Binary
Namespace: SubscriptionNamespace
Parameters: to, type
            to="[n.subscription_to_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]"
            type="[n.subscription_type_field
Macro
Parameters: do
.value
Binary
Namespace: FieldNamespace
/]"
            />
           <n.page_node
Binary
Namespace: NodePageNamespace
Parameters: do
.sub_descendants_user
Macro
Requires: node
Parameters: user
 user="[n.local_user
Macro
Parameters: do
/]"/>
            
            <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.visitor
Binary
Namespace: ServletNamespace
Parameters: do
.is_site_admin
Macro
Requires: user
>
                <then>
                    <n.redirect_to
Binary
Namespace: ServletNamespace
Parameters: url
.subscription_saved_user_url
Macro
/>
                </then>
                <else>
                    <n.redirect_to
Binary
Namespace: ServletNamespace
Parameters: url
.subscription_saved_url
Macro
/>
                </else>
            </n.if.visitor.is_site_admin>
        </then>
    </n.if.equal>
</macro>