Increase domain component length limit
[hcoop/zz_old/portal.git] / app / join.mlt
CommitLineData
20a679fc 1<% @header [("title", ["Apply for membership"])] %>
2
3<% if $"cmd" = "app" then
5146e435 4 val minor = $"minor" <> "";
20a679fc 5 val name = $"name";
6 val rname = $"rname";
5146e435 7 val gname = $"gname";
20a679fc 8 val email = $"email";
9 val forward = $"forward" <> "on";
10 val uses = $"uses";
11 val other = $"other";
12
5146e435 13 if $"agree" <> "on" then
94fb7d51 14 %><h3>You must accept the Terms of Service!</h3><%
5146e435 15 elseif name = "" then
94fb7d51 16 %><h3>Please enter a username</h3><%
20a679fc 17 elseif rname = "" then
94fb7d51 18 %><h3>Please enter the potential member's name</h3><%
5146e435 19 elseif (iff minor then gname = "" else false) then
94fb7d51 20 %><h3>Please enter your name, as legal guardian<b></h3><%
20a679fc 21 elseif email = "" then
94fb7d51 22 %><h3>Please enter your contact e-mail address</h3><%
20a679fc 23 elseif uses = "" then
94fb7d51 24 %><h3>Please enter your proposed uses</h3><%
20a679fc 25 elseif not (App.validUser name) then
94fb7d51 26 %><h3>Invalid requested username</h3><%
20a679fc 27 elseif App.userExists name then
94fb7d51 28 %><h3>That username is already in use.</b><h3><%
20a679fc 29 elseif not (App.validEmail email) then
94fb7d51 30 %><h3>Invalid e-mail address</h3><%
20a679fc 31 elseif not (App.apply { name = name, rname = rname, email = email,
5146e435 32 gname = (case gname of "" => NONE | _ => SOME gname),
20a679fc 33 forward = forward, uses = uses, other = other }) then
94fb7d51 34 %><h3>Error sending confirmation e-mail</h3><%
20a679fc 35 else
94fb7d51 36 %><h3>Application recorded</h3>
20a679fc 37 Check your e-mail for a message with further instructions.<%
38 end
5146e435 39else
40 val minor = $"minor" <> "" %>
20a679fc 41
42<form action="join" method="post">
43<input type="hidden" name="cmd" value="app">
94fb7d51 44<table class="blanks">
45<tr> <td>Desired username:</td> <td><input name="name"><br>
f3c86948 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.<br>
47 You also don't need to worry about whether or not the username you want is already taken. This application system will let you know if that is the case. You can probably use a shorter and simpler name than you are accustomed to getting at larger services, so we encourage you to try such names first.</td> </tr>
5146e435 48<% if minor then %>
94fb7d51 49<tr> <td>New member's "real" name:</td> <td><input name="rname"></td> </tr>
29826664 50<tr> <td>Legal guardian's name:</td> <td><input name="gname"> Please enter your full name, as you would on a normal, legally binding contract.</td></tr>
5146e435 51<% else %>
29826664 52<tr> <td>Your "real" name:</td> <td><input name="rname"> Please enter your full name, as you would on a normal, legally binding contract.</td></tr>
5146e435 53<% end %>
94fb7d51 54<tr> <td>Contact e-mail address</td> <td><input name="email"></td> </tr>
55<tr> <td><input type="checkbox" name="forward"></td> <td>Check this box if you would like to use hcoop as your primary e-mail provider.<br>
20a679fc 56 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>
5146e435 57 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>
94fb7d51 58<tr> <td>How do you plan to use a hcoop membership?</td> <td><textarea name="uses" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
59<tr> <td>Any other information about yourself</td> <td><textarea name="other" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
20a679fc 60</table>
5146e435 61
fd650826 62<br><hr><br>
63
64You must agree to the following terms to be considered for membership:
65
5146e435 66<h2><b>Terms of Service Agreement</b></h2>
67
68<% App.readTosBody () %>
69
70<br><hr><br>
71
72<input type="checkbox" name="agree">
73<% if minor then App.readTosMinorAgree () else App.readTosAgree () end %>
74
75<br><br><input type="submit" value="Apply">
76
20a679fc 77</form>
78
79<% end %>
80
81<% @footer[] %>