change_user_groups

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 "change_user_groups".
... in profile_backbutton.naml
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<override_macro name="change_user_groups" requires="servlet">
    <n.user_page.>
        <n.if.not.visitor.can_manage_users_and_groups>
            <then>
                <n.login.><t>Only authorized users can proceed in this area.</t></n.login.>
            </then>
        </n.if.not.visitor.can_manage_users_and_groups>
        <n.if.is_submitted_form>
            <then>
                <n.catch_exception. id="save-block">
                    <n.edit_page_user.>
                        <n.user_group_list.loop.group_field. group="[n.current_group/]">
                            <n.if.is_checked>
                                 <then><n.add_to_group.current_group/></then>
                                 <else><n.remove_from_group.current_group/></else>
                            </n.if.is_checked>
                        </n.user_group_list.loop.group_field.>
                        <n.get_parameter_values. name="newgroup">
                            <n.loop.>
                                <n.if.not.is_empty.current_parameter_value>
                                     <then><n.add_to_group.current_parameter_value/></then>
                                </n.if.not.is_empty.current_parameter_value>
                            </n.loop.>
                        </n.get_parameter_values.>
                    </n.edit_page_user.>
                    <n.redirect_to.page_user.url/>
                </n.catch_exception.>
            </then>
        </n.if.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Change User Groups</t></n.title.>
                <style type="text/css">
                    .title-row {
                        padding:.2em;
                        border-bottom-width:2px;
                        border-bottom-style:solid;
                        font-weight:bold;
                    }
                </style>
            </head>
            <body>
                <n.page_user.profile_header/>
                <span style="display:none;" id="user_url"><n.page_user.url/></span>
                <div class="title-row light-border-color" style="margin-top:.5em">
                    <t>Groups of this user</t>
                </div>
                <n.form.>
                    <table>
                        <n.fixed_group_row name="[n.anyone_group/]" tip="[t]All users belong to this group[/t]"/>
                        <n.if.page_user.is_registered>
                            <then><n.fixed_group_row name="[n.registered_group/]" tip="[t]Users that completed the registration process[/t]"/></then>
                        </n.if.page_user.is_registered>
 
                        <n.if.page_user.is_authenticated>
                            <then>
                                <n.user_group_list.loop.>
                                    <n.group_row>
                                        <group><n.current_group/></group>
                                        <checked><n.page_user.is_in_group.current_group/></checked>
                                    </n.group_row>
                                </n.user_group_list.loop.>
 
                                <n.empty_group_controls/>
                            </then>
                        </n.if.page_user.is_authenticated>
                    </table>
 
                    <n.if.page_user.is_authenticated>
                        <then>
                            <div style="margin-top:1.4em">
                                <input type="submit" value="[t]Save Changes[/t]" />
                                <t>or</t> <a href="[n.page_user.url/]"><t>Cancel</t></a>
                            </div>
                        </then>
                    </n.if.page_user.is_authenticated>
                </n.form.>
            </body>
        </n.html>
    </n.user_page.>
</override_macro>
Overrides default macro
... in change_user_groups.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<macro name="change_user_groups" requires="servlet">
    <n.user_page.>
        <n.if.not.visitor.can_manage_users_and_groups>
            <then>
                <n.login.><t>Only authorized users can proceed in this area.</t></n.login.>
            </then>
        </n.if.not.visitor.can_manage_users_and_groups>
        <n.if.is_submitted_form>
            <then>
                <n.catch_exception. id="save-block">
                    <n.edit_page_user.>
                        <n.user_group_list.loop.group_field. group="[n.current_group/]">
                            <n.if.is_checked>
                                 <then><n.add_to_group.current_group/></then>
                                 <else><n.remove_from_group.current_group/></else>
                            </n.if.is_checked>
                        </n.user_group_list.loop.group_field.>
                        <n.get_parameter_values. name="newgroup">
                            <n.loop.>
                                <n.if.not.is_empty.current_parameter_value>
                                     <then><n.add_to_group.current_parameter_value/></then>
                                </n.if.not.is_empty.current_parameter_value>
                            </n.loop.>
                        </n.get_parameter_values.>
                    </n.edit_page_user.>
                    <n.redirect_to.page_user.url/>
                </n.catch_exception.>
            </then>
        </n.if.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Change User Groups</t></n.title.>
                <style type="text/css">
                    .title-row {
                        padding:.2em;
                        border-bottom-width:2px;
                        border-bottom-style:solid;
                        font-weight:bold;
                    }
                </style>
            </head>
            <body>
                <n.page_user.profile_header/>
 
                <div class="title-row light-border-color" style="margin-top:.5em">
                    <t>Groups of this user</t>
                </div>
                <n.form.>
                    <table>
                        <n.fixed_group_row name="[n.anyone_group/]" tip="[t]All users belong to this group[/t]"/>
                        <n.if.page_user.is_registered>
                            <then><n.fixed_group_row name="[n.registered_group/]" tip="[t]Users that completed the registration process[/t]"/></then>
                        </n.if.page_user.is_registered>
 
                        <n.if.page_user.is_authenticated>
                            <then>
                                <n.user_group_list.loop.>
                                    <n.group_row>
                                        <group><n.current_group/></group>
                                        <checked><n.page_user.is_in_group.current_group/></checked>
                                    </n.group_row>
                                </n.user_group_list.loop.>
 
                                <n.empty_group_controls/>
                            </then>
                        </n.if.page_user.is_authenticated>
                    </table>
 
                    <n.if.page_user.is_authenticated>
                        <then>
                            <div style="margin-top:1.4em">
                                <input type="submit" value="[t]Save Changes[/t]" />
                                <t>or</t> <a href="[n.page_user.url/]"><t>Cancel</t></a>
                            </div>
                        </then>
                    </n.if.page_user.is_authenticated>
                </n.form.>
            </body>
        </n.html>
    </n.user_page.>
</macro>