Fix some money bugs and add equalizeBalances
[hcoop/zz_old/portal.git] / app / join.mlt
CommitLineData
20a679fc 1<% @header [("title", ["Apply for membership"])] %>
2
3<% if $"cmd" = "app" then
4 val name = $"name";
5 val rname = $"rname";
6 val email = $"email";
7 val forward = $"forward" <> "on";
8 val uses = $"uses";
9 val other = $"other";
10
11 if name = "" then
12 %><h3><b>Please enter a username</b></h3><%
13 elseif rname = "" then
14 %><h3><b>Please enter your name</b></h3><%
15 elseif email = "" then
16 %><h3><b>Please enter your contact e-mail address</b></h3><%
17 elseif uses = "" then
18 %><h3><b>Please enter your proposed uses</b></h3><%
19 elseif not (App.validUser name) then
20 %><h3><b>Invalid requested username</b></h3><%
21 elseif App.userExists name then
22 %><h3><b>That username is already in use.</b><h3><%
23 elseif not (App.validEmail email) then
24 %><h3><b>Invalid e-mail address</b></h3><%
25 elseif not (App.apply { name = name, rname = rname, email = email,
26 forward = forward, uses = uses, other = other }) then
27 %><h3><b>Error sending confirmation e-mail</b></h3><%
28 else
29 %><h3><b>Application recorded</b></h3>
30 Check your e-mail for a message with further instructions.<%
31 end
32else %>
33
34<form action="join" method="post">
35<input type="hidden" name="cmd" value="app">
36<table>
37<tr> <td align="right" valign="top"><b>Desired username</b>:</td> <td><input name="name"><br>
38 You should follow usual UNIX conventions, and it's helpful to pick a name you wouldn't mind using to identify yourself to strangers.</td> </tr>
39<tr> <td align="right"><b>Your "real" name</b>:</td> <td><input name="rname"></td> </tr>
40<tr> <td align="right"><b>Contact e-mail address</b></td> <td><input name="email"></td> </tr>
41<tr> <td align="right" valign="top"><input type="checkbox" name="forward"></td> <td>Check this box if you would like to use hcoop as your primary e-mail provider.<br>
42 If you don't select this option and you are approved to join, e-mail to your account will be forwarded to the address you provide here.<br>
43 You can change this option later, but we'll probably have helpul things to e-mail you as soon as you join. It's important that we be able to reach members reliably, so please don't decide to use us as your primary e-mail provider unless you can commit to checking your hcoop mailbox just as often as any other personal accounts you have.</td> </tr>
44<tr> <td align="right" valign="top"><b>How do you plan to use a hcoop membership?</b></td> <td><textarea name="uses" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
45<tr> <td align="right" valign="top"><b>Any other information about yourself</b></td> <td><textarea name="other" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
46<tr> <td><input type="submit" value="Apply"></td> </tr>
47</table>
48</form>
49
50<% end %>
51
52<% @footer[] %>