X-Git-Url: http://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/fd650826a845b48172835747e2394d160b8863de..e23ca71c9431301fe484a74654c1ef5d73deca3b:/app/join.mlt
diff --git a/app/join.mlt b/app/join.mlt
dissimilarity index 61%
index 10164cd..0ac3f50 100644
--- a/app/join.mlt
+++ b/app/join.mlt
@@ -1,80 +1,93 @@
-<% @header [("title", ["Apply for membership"])] %>
-
-<% if $"cmd" = "app" then
- val minor = $"minor" <> "";
- val name = $"name";
- val rname = $"rname";
- val gname = $"gname";
- val email = $"email";
- val forward = $"forward" <> "on";
- val uses = $"uses";
- val other = $"other";
-
- if $"agree" <> "on" then
- %>
You must accept the Terms of Service!
<%
- elseif name = "" then
- %>
Please enter a username
<%
- elseif rname = "" then
- %>
Please enter the potential member's name
<%
- elseif (iff minor then gname = "" else false) then
- %>
Please enter your name, as legal guardian
<%
- elseif email = "" then
- %>
Please enter your contact e-mail address
<%
- elseif uses = "" then
- %>
Please enter your proposed uses
<%
- elseif not (App.validUser name) then
- %>
Invalid requested username
<%
- elseif App.userExists name then
- %>
That username is already in use.
<%
- elseif not (App.validEmail email) then
- %>
Invalid e-mail address
<%
- elseif not (App.apply { name = name, rname = rname, email = email,
- gname = (case gname of "" => NONE | _ => SOME gname),
- forward = forward, uses = uses, other = other }) then
- %>
Error sending confirmation e-mail
<%
- else
- %>
Application recorded
- Check your e-mail for a message with further instructions.<%
- end
-else
- val minor = $"minor" <> "" %>
-
-
-
-<% end %>
-
-<% @footer[] %>
\ No newline at end of file
+<% @header [("title", ["Apply for membership"])] %>
+
+<% if $"cmd" = "app" then
+ val minor = $"minor" <> "";
+ val name = $"name";
+ val rname = $"rname";
+ val gname = $"gname";
+ val email = $"email";
+ val forward = $"forward" <> "on";
+ val uses = $"uses";
+ val other = $"other";
+
+ if $"agree" <> "on" then
+ %>
You must accept the Terms of Service!
<%
+ elseif name = "" then
+ %>
Please enter a username
<%
+ elseif rname = "" then
+ %>
Please enter the potential member's name
<%
+ elseif (iff minor then gname = "" else false) then
+ %>
Please enter your name, as legal guardian
<%
+ elseif email = "" then
+ %>
Please enter your contact e-mail address
<%
+ elseif uses = "" then
+ %>
Please enter your proposed uses
<%
+ elseif not (App.validUser name) then
+ %>
Invalid requested username
<%
+ elseif App.userExists name then
+ %>
That username is already in use.
<%
+ elseif not (App.validEmail email) then
+ %>
Invalid e-mail address
<%
+ else switch App.apply { name = name, rname = rname, email = email,
+ gname = (case gname of "" => NONE | _ => SOME gname),
+ forward = forward, uses = uses, other = other,
+ paypal = (case $"paypal" of "" => NONE | s => SOME s),
+ checkout = (case $"checkout" of "" => NONE | s => SOME s) } of
+ NONE => %>
Error sending confirmation e-mail
<%
+ | SOME unix_passwd =>
+ %>
Application recorded
+ Check your e-mail for a message with further instructions. Save this password to use to access your new account if your application is approved:
+
<% Web.html unix_passwd %>
<%
+ end
+ end
+else
+ val minor = $"minor" <> "" %>
+
+