Commit | Line | Data |
---|---|---|
a90da8b1 AC |
1 | <% @header [("title", ["Apply for membership"])] %> |
2 | ||
3 | <% if $"cmd" = "app" then | |
f3f3ad24 | 4 | val minor = $"minor" <> ""; |
a90da8b1 AC |
5 | val name = $"name"; |
6 | val rname = $"rname"; | |
f3f3ad24 | 7 | val gname = $"gname"; |
a90da8b1 AC |
8 | val email = $"email"; |
9 | val forward = $"forward" <> "on"; | |
10 | val uses = $"uses"; | |
11 | val other = $"other"; | |
12 | ||
f3f3ad24 AC |
13 | if $"agree" <> "on" then |
14 | %><h3><b>You must accept the Terms of Service!</b></h3><% | |
15 | elseif name = "" then | |
a90da8b1 AC |
16 | %><h3><b>Please enter a username</b></h3><% |
17 | elseif rname = "" then | |
f3f3ad24 AC |
18 | %><h3><b>Please enter the potential member's name</b></h3><% |
19 | elseif (iff minor then gname = "" else false) then | |
20 | %><h3><b>Please enter your name, as legal guardian<b></h3><% | |
a90da8b1 AC |
21 | elseif email = "" then |
22 | %><h3><b>Please enter your contact e-mail address</b></h3><% | |
23 | elseif uses = "" then | |
24 | %><h3><b>Please enter your proposed uses</b></h3><% | |
25 | elseif not (App.validUser name) then | |
26 | %><h3><b>Invalid requested username</b></h3><% | |
27 | elseif App.userExists name then | |
28 | %><h3><b>That username is already in use.</b><h3><% | |
29 | elseif not (App.validEmail email) then | |
30 | %><h3><b>Invalid e-mail address</b></h3><% | |
31 | elseif not (App.apply { name = name, rname = rname, email = email, | |
f3f3ad24 | 32 | gname = (case gname of "" => NONE | _ => SOME gname), |
a90da8b1 AC |
33 | forward = forward, uses = uses, other = other }) then |
34 | %><h3><b>Error sending confirmation e-mail</b></h3><% | |
35 | else | |
36 | %><h3><b>Application recorded</b></h3> | |
37 | Check your e-mail for a message with further instructions.<% | |
38 | end | |
f3f3ad24 AC |
39 | else |
40 | val minor = $"minor" <> "" %> | |
a90da8b1 AC |
41 | |
42 | <form action="join" method="post"> | |
43 | <input type="hidden" name="cmd" value="app"> | |
44 | <table> | |
45 | <tr> <td align="right" valign="top"><b>Desired username</b>:</td> <td><input name="name"><br> | |
1d2cae17 | 46 | You should follow usual UNIX conventions, including limiting yourself to lowercase letters and at most 8 characters. It's helpful to pick a name you wouldn't mind using to identify yourself to both strangers and friends. Something based on your "real" name is a safe bet.</td> </tr> |
f3f3ad24 AC |
47 | <% if minor then %> |
48 | <tr> <td align="right"><b>New member's "real" name</b>:</td> <td><input name="rname"></td> </tr> | |
49 | <tr> <td align="right"><b>Legal guardian's name</b>:</td> <td><input name="gname"></td> </tr> | |
50 | <% else %> | |
a90da8b1 | 51 | <tr> <td align="right"><b>Your "real" name</b>:</td> <td><input name="rname"></td> </tr> |
f3f3ad24 | 52 | <% end %> |
a90da8b1 AC |
53 | <tr> <td align="right"><b>Contact e-mail address</b></td> <td><input name="email"></td> </tr> |
54 | <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> | |
55 | 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> | |
f3f3ad24 | 56 | You can change this option later, but we'll probably have helpful 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> |
a90da8b1 AC |
57 | <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> |
58 | <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> | |
a90da8b1 | 59 | </table> |
f3f3ad24 | 60 | |
1d2cae17 AC |
61 | <br><hr><br> |
62 | ||
63 | You must agree to the following terms to be considered for membership: | |
64 | ||
f3f3ad24 AC |
65 | <h2><b>Terms of Service Agreement</b></h2> |
66 | ||
67 | <% App.readTosBody () %> | |
68 | ||
69 | <br><hr><br> | |
70 | ||
71 | <input type="checkbox" name="agree"> | |
72 | <% if minor then App.readTosMinorAgree () else App.readTosAgree () end %> | |
73 | ||
74 | <br><br><input type="submit" value="Apply"> | |
75 | ||
a90da8b1 AC |
76 | </form> |
77 | ||
78 | <% end %> | |
79 | ||
80 | <% @footer[] %> |