X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/a4ccdb5e625953aa6ece8874b34c811353144426..404f0809d9595e8132bc12842c1e8cf4102d7078:/domain.mlt
diff --git a/domain.mlt b/domain.mlt
index eb4c4b5..0493788 100644
--- a/domain.mlt
+++ b/domain.mlt
@@ -4,48 +4,53 @@ val admin = Group.inGroupName "server";
if $"req" <> "" then
val dom = $"req";
- if Util.validDomain dom then
+ if not (Util.validDomain dom) then
+ %>
Invalid domain name
<%
+ elseif String.isPrefix "www." dom and $"want_www" = "" then
+ val base = String.extract (dom, 4, NONE)
+ %>Are you sure you want to request a domain that begins with "www."?
+ You probably meant to request <% base %> instead, which would grant you the ability to configure <% dom %> as well. Unless you've registered <% dom %> directly with your registrar, you will be unable to configure it without the right to set nameservers for <% base %>.
+ ">Yes, go ahead and place the request!
<%
+ else
val id = Domain.add (Init.getUserId(), dom, $"msg");
if not (Domain.notifyNew id) then
- %>Error sending e-mail notification
<%
+ %>Error sending e-mail notification
<%
end
- %>Request added
<%
- else
- %>Invalid domain name
<%
+ %>Request added
<%
end
elseif $"cmd" = "open" then
- %>Open requests
+ %>Open requests
List all requests<%
foreach (name, req) in Domain.listOpen () do %>
-
- By: | <% name %> |
- Time: | <% #stamp req %> |
- Domain: | <% #data req %> |
- Reason: | <% Web.html (#msg req) %> |
+
+ By: | <% name %> |
+ Time: | <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago) |
+ Domain: | <% #data req %> |
+ Reason: | <% Web.html (#msg req) %> |
<% if admin then %>
[Modify]
[Delete]
- To set up, run: domtool.real mkdom <% #data req %> <% name %>
+ To set up, run: domtool-admin grant <% name %> domain <% #data req %>
<% end %>
<% end
elseif $"cmd" = "list" then
- %>All requests
<%
+ %>All requests
<%
foreach (name, req) in Domain.list () do %>
-
- By: | <% name %> |
- Time: | <% #stamp req %> |
- Domain: | <% #data req %> |
- Reason: | <% Web.html (#msg req) %> |
+
+ By: | <% name %> |
+ Time: | <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago) |
+ Domain: | <% #data req %> |
+ Reason: | <% Web.html (#msg req) %> |
<% if admin then %>
@@ -61,20 +66,20 @@ elseif $"mod" <> "" then
val id = Web.stoi ($"mod");
val req = Domain.lookup id;
val user = Init.lookupUser (#usr req) %>
-Handle request
+Handle request