0
|
1 <macro name="unauthorized" requires="servlet">
|
|
2 <n.node_page.>
|
|
3 <n.if.is_submitted_form>
|
|
4 <then>
|
|
5 <n.users_in_group. group="[n.administrators_group/]">
|
|
6 <n.loop.>
|
|
7 <n.current_user.send_request_email
|
|
8 explanation="[n.message_field.value/]"
|
|
9 />
|
|
10 </n.loop.>
|
|
11 </n.users_in_group.>
|
|
12 </then>
|
|
13 </n.if.is_submitted_form>
|
|
14 <n.html>
|
|
15 <head>
|
|
16 <META NAME="robots" CONTENT="noindex,nofollow"/>
|
|
17 <n.title.><t>Unauthorized</t></n.title.>
|
|
18 </head>
|
|
19 <body>
|
|
20 <div style="font-size:140%;margin:.5em 0 1em">
|
|
21 <t>Authorized Users Only</t>
|
|
22 </div>
|
|
23 <t>Only authorized users can proceed in this area.</t>
|
|
24 <t>You can use the form below to send a request to the administrators.</t>
|
|
25 <div class="second-font big-title" style="margin:1.5em 0 .5em">
|
|
26 <t>Access Request</t>
|
|
27 </div>
|
|
28 <n.if.not.is_submitted_form>
|
|
29 <then>
|
|
30 <div class="weak-color" style="margin:.3em 0">
|
|
31 <t>Explain to the administrator(s) why you want to access this restricted area.</t>
|
|
32 </div>
|
|
33 <n.form.>
|
|
34 <n.message_field.textarea wrap="SOFT" style="width:35em;height:5em;" />
|
|
35 <n.message_field.focus/>
|
|
36 <br/>
|
|
37 <input type="submit" id="send-request" value="[t]Send Request[/t]"/>
|
|
38 <t>or</t> <a href="[n.page_node.url/]"><t>Cancel</t></a>
|
|
39 </n.form.>
|
|
40 </then>
|
|
41 <else>
|
|
42 <img src="/images/success.png" class="image16"/>
|
|
43 <t>Your request has been successfully sent.</t>
|
|
44 </else>
|
|
45 </n.if.not.is_submitted_form>
|
|
46 </body>
|
|
47 </n.html>
|
|
48 </n.node_page.>
|
|
49 </macro>
|
|
50
|
|
51 <macro name="send_request_email" parameters="explanation" requires="user,node_page" unindent="true">
|
|
52 <n.new_email.>
|
|
53 <n.send>
|
|
54 <to><n.user_email/></to>
|
|
55 <subject><t>User requested authorization to join <t.location.page_node.subject/></t></subject>
|
|
56 <text_part>
|
|
57 <t>Dear <t.name.name/>,</t>
|
|
58
|
|
59 <t><t.name.visitor.name/> requested authorization to join the <t.location.page_node.subject/>:</t>
|
|
60 <n.page_node.url/>
|
|
61
|
|
62 * <t>Explanation from this user:</t>
|
|
63 <n.explanation/>
|
|
64
|
|
65 * <t>User email:</t>
|
|
66 <n.visitor.user_email/>
|
|
67
|
|
68 <t>To accept this request, you should add this user to at least one group that has access to this area:</t>
|
|
69 <n.base_url/><n.visitor.change_user_groups_path/>
|
|
70
|
|
71 <t>Or you can ignore this email if it is better to keep this user away from that area.</t>
|
|
72 ________________________________________
|
|
73 <t>Free Embeddable <t.app.page_node.view_name/></t> powered by Nabble
|
|
74 <n.nabble_homepage/>
|
|
75 </text_part>
|
|
76 <html_part>
|
|
77 <t>Dear <t.name.name/>,</t><br/>
|
|
78 <br/>
|
|
79 <t><t.name.visitor.name/> requested authorization to join the <t.location.page_node.subject/>:</t><br/>
|
|
80 <a href="[n.page_node.url/]"><n.page_node.url/></a><br/>
|
|
81 <br/>
|
|
82 <b><t>Explanation from this user:</t></b><br/>
|
|
83 <n.explanation/><br/>
|
|
84 <br/>
|
|
85 <b><t>User email:</t></b><br/>
|
|
86 <n.visitor.user_email/><br/>
|
|
87 <br/>
|
|
88 <t>To accept this request, you should add this user to at least one group that has access to this area:</t>
|
|
89 <div style="background-color:#FFFADB;border:#EDDD79 solid 1px;margin:1.2em 0;padding:.5em">
|
|
90 <n.base_url/><n.visitor.change_user_groups_path/>
|
|
91 </div>
|
|
92 <t>Or you can ignore this email if it is better to keep this user away from that area.</t><br/>
|
|
93 ________________________________________<br/>
|
|
94 <t>Free Embeddable <t.app.page_node.view_name/></t> powered by Nabble<br/>
|
|
95 <n.nabble_homepage/><br/><br/>
|
|
96 </html_part>
|
|
97 </n.send>
|
|
98 </n.new_email.>
|
|
99 </macro>
|
|
100
|
|
101 <macro name="unauthorized_path" requires="node">
|
|
102 <n.encode_url.>
|
|
103 /template/NamlServlet.jtp?macro=unauthorized&node=<n.id/>
|
|
104 </n.encode_url.>
|
|
105 </macro>
|
|
106
|
|
107 <macro name="unauthorized_link" requires="node" dot_parameter="text" parameters="title, class">
|
|
108 <a href="[n.unauthorized_path/]" title="[n.title/]" class="[n.class/]"><n.text/></a>
|
|
109 </macro> |