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

- - - -
Requestor: <% #name user %>
Time: <% #stamp req %>
Status: + + + - - + +
Requestor: <% #name user %>
Time: <% #stamp req %> (<% Util.diffFromNow (#stamp req) %> ago)
Status:
Domain:
Message:
Domain:
Message:
@@ -86,12 +91,10 @@ elseif $"mod" <> "" then val oldStatus = #status req; val newStatus = Domain.statusFromInt (Web.stoi ($"status")); Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus}; - if oldStatus <> newStatus then - if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then - %>

Error sending e-mail notification

<% - end + if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then + %>

Error sending e-mail notification

<% end - %>

Request modified

+ %>

Request modified

Back to: open requests, all requests <% elseif $"del" <> "" then @@ -99,26 +102,26 @@ elseif $"mod" <> "" then 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 %>?

+ %>

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

+ %>

Request deleted

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

Request new domain

+

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:
+ +
Domain:
Reason: