1 <% @header [("title", ["Membership applications"])];
3 val you = Init.getUserId ();
4 val board = Group.inGroupName "board";
5 val root = Group.inGroupNum 0;
10 Group.requireGroupName "board";
11 App.vote (you, Web.stoi ($"vote"))
12 %><h3><b>Vote registered</b></h3><%
13 elseif $"unvote" <> "" then
14 Group.requireGroupName "board";
15 App.unvote (you, Web.stoi ($"unvote"))
16 %><h3><b>Unvote registered</b></h3><%
17 elseif $"deny" <> "" then
19 val appl = App.lookupApp (Web.stoi ($"deny"))
20 %><h3><b>Deny application for <% #name appl %></b></h3>
21 <form action="apps" method="post">
22 <input type="hidden" name="deny2" value="<% $"deny" %>">
24 <textarea name="msg" rows="5" cols="80" wrap="soft"></textarea><br>
25 <input type="submit" value="Submit">
27 elseif $"deny2" <> "" then
28 Group.requireGroupName "board";
29 if not (App.deny (Web.stoi ($"deny2"), $"msg")) then
30 %><h3><b>Error denying application</b></h3><%
32 %><h3><b>Application denied</b></h3><%
34 elseif $"approve" <> "" then
36 val appl = App.lookupApp (Web.stoi ($"approve"))
37 %><h3><b>Approve application for <% #name appl %></b></h3>
38 <form action="apps" method="post">
39 <input type="hidden" name="approve2" value="<% $"approve" %>">
41 <textarea name="msg" rows="5" cols="80" wrap="soft"></textarea><br>
42 <input type="submit" value="Submit">
44 elseif $"approve2" <> "" then
45 Group.requireGroupName "board";
46 if not (App.approve (Web.stoi ($"approve2"), $"msg")) then
47 %><h3><b>Error approving application</b></h3><%
49 %><h3><b>Application approved</b></h3><%
53 <% if showNormal then %>
54 <h3><b>Pending applications</b></h3>
56 <% foreach appl in App.listPending () do %>
59 <tr> <td align="right"><b>Received</b>:</td> <td><% #applied appl %></td> </tr>
60 <tr> <td align="right"><b>Approved by</b>:</td> <td><%
63 foreach (id, name) in App.votes (#id appl) do
69 %><a href="user?id=<% id %>"><% name %></a><%
72 %> <a href="apps?unvote=<% #id appl %>">[Unvote]</a><%
74 end %> <% if (iff board then not found else false) then %><a href="apps?vote=<% #id appl %>">[Vote]</a><% end %></td> </tr>
75 <tr> <td align="right"><b>Username</b>:</td> <td><% #name appl %></td> </tr>
76 <tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname appl) %></td> </tr>
77 <tr> <td align="right"><b>E-mail address</b>:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
78 <tr> <td align="right"><b>Forward e-mail?</b></td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
79 <tr> <td align="right" valign="top"><b>Proposed uses</b>:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
80 <tr> <td align="right" valign="top"><b>Other information</b>:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
84 <a href="apps?approve=<% #id appl %>">Add this member.</a><br>
85 <a href="apps?deny=<% #id appl %>">Deny this application.</a>