<% @header [("title", ["Mailing list creation requests"])]; val admin = Group.inGroupName "lists"; if $"req" <> "" then val dom = $"req"; if Util.validEmail dom then val id = MailingList.add (Init.getUserId(), dom, $"msg"); if not (MailingList.notifyNew id) then %>

Error sending e-mail notification

<% end %>

Request added

<% else %>

Invalid list e-mail address

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

Open requests

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


By: <% name %>
Time: <% #stamp req %>
List name: <% #data req %>
Reason: <% Web.html (#msg req) %>
<% if admin then val vitals = MailingList.listWebHost (#data req) %>
[Modify] [Delete]
To set up, run: listnew <% #user vitals %> <% #dom vitals %> <% #vhost vitals %> <% name %> <% Util.randomPassword () %> <% end %> <% end elseif $"cmd" = "list" then %>

All requests

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


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

Handle request

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

Error sending e-mail notification

<% end end %>

Request modified

Back to: open requests, all requests <% elseif $"del" <> "" then Group.requireGroupName "lists"; val id = Web.stoi ($"del"); val req = MailingList.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 "lists"; val id = Web.stoi ($"del2"); MailingList.delete id %>

Request deleted

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

Request new mailing list

Enter here the e-mail address you would like for your list. Please keep in mind that the part of your list address before the "@" must be unique across all mailing lists we run. We may reject applications with overly general names here, especially names of current users or UNIX usernames that are likely to be chosen by future members. The "Reason" field is optional.

If you want to use the Mailman web interface on your new list, and you want this to appear on a different web virtual host than hcoop.net, then you should follow these instructions before requesting the list. You should only need to follow the instructions once per domain.

List name:
Reason:
<% end %> <% @footer[] %>