<% @header [("title", ["Domain set-up requests"])]; val admin = Group.inGroupName "server"; if $"req" <> "" then val dom = $"req"; 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

<% end %>

Request added

<% end elseif $"cmd" = "open" then %>

Open requests

List all requests<% foreach (name, req) in Domain.listOpen () do %>


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-admin grant <% name %> domain <% #data req %> <% end %> <% end elseif $"cmd" = "list" then %>

All requests

<% foreach (name, req) in Domain.list () do %>


By: <% name %>
Time: <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)
Domain: <% #data req %>
Reason: <% Web.html (#msg req) %>
<% if admin then %>
[Modify] [Delete] <% end %> <% end elseif $"mod" <> "" then Group.requireGroupName "server"; val id = Web.stoi ($"mod"); val req = Domain.lookup id; val user = Init.lookupUser (#usr req) %>

Handle request

Requestor: <% #name user %>
Time: <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)
Status:
Domain:
Message:
<% elseif $"save" <> "" then Group.requireGroupName "server"; val id = Web.stoi ($"save"); val req = Domain.lookup id; val oldStatus = #status req; val newStatus = Domain.statusFromInt (Web.stoi ($"status")); Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus}; if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then %>

Error sending e-mail notification

<% end %>

Request modified

Back to: open requests, all requests <% elseif $"del" <> "" then Group.requireGroupName "server"; val id = Web.stoi ($"del"); val req = Domain.lookup id; val user = Init.lookupUser (#usr req) %>

Are you sure you want to delete request by <% #name user %> for <% #data req %>?

Yes, I'm sure! <% elseif $"del2" <> "" then Group.requireGroupName "server"; val id = Web.stoi ($"del2"); Domain.delete id %>

Request deleted

Back to: open requests, all requests <% else %>

Request new domain

Enter the full Internet domain name that you own and would like set up here. We don't do domain registration, so it is your responsibility to register this name with your registrar of choice before submitting it here. The "Reason" field is optional.
Domain:
Reason:

Your current domains

To remove any domain you control, you can run domtool-admin rmdom $DOMAIN.

<% end %> <% @footer[] %>