Change granter.sh to give permissions to user specified on command line
[hcoop/zz_old/portal.git] / domain.mlt
index b5f07de..9b7889d 100644 (file)
@@ -7,24 +7,24 @@ if $"req" <> "" then
        if Util.validDomain dom then
                val id = Domain.add (Init.getUserId(), dom, $"msg");
                if not (Domain.notifyNew id) then
        if Util.validDomain dom then
                val id = Domain.add (Init.getUserId(), dom, $"msg");
                if not (Domain.notifyNew id) then
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                end
                end
-               %><h3><b>Request added</b></h3><%
+               %><h3>Request added</h3><%
        else
        else
-               %><h3><b>Invalid domain name</b></h3><%
+               %><h3>Invalid domain name</h3><%
        end
 
 elseif $"cmd" = "open" then
        end
 
 elseif $"cmd" = "open" then
-       %><h3><b>Open requests</b></h3>
+       %><h3>Open requests</h3>
        <a href="domain?cmd=list">List all requests</a><%
 
        foreach (name, req) in Domain.listOpen () do %>
 <br><hr><br>
        <a href="domain?cmd=list">List all requests</a><%
 
        foreach (name, req) in Domain.listOpen () do %>
 <br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Domain</b>:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Domain:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <% if admin then %>
 </table>
 
 <% if admin then %>
@@ -37,15 +37,15 @@ elseif $"cmd" = "open" then
 <%     end
 
 elseif $"cmd" = "list" then
 <%     end
 
 elseif $"cmd" = "list" then
-       %><h3><b>All requests</b></h3><%
+       %><h3>All requests</h3><%
 
        foreach (name, req) in Domain.list () do %>
 <br><hr><br>
 
        foreach (name, req) in Domain.list () do %>
 <br><hr><br>
-<table>
-<tr> <td align="right"><b>By</b>:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td colspan="2"><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Domain</b>:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<table class="blanks">
+<tr> <td>By:</td> <td colspan="2"><a href="user?id=<% #usr req %>"><% name %></a></td> </tr>
+<tr> <td>Time:</td> <td colspan="2"><% #stamp req %></td> </tr>
+<tr> <td>Domain:</td> <td><a href="<% Util.whoisUrl (#data req) %>"><% #data req %></a></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <% if admin then %>
 </table>
 
 <% if admin then %>
@@ -61,20 +61,20 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"mod");
        val req = Domain.lookup id;
        val user = Init.lookupUser (#usr req) %>
        val id = Web.stoi ($"mod");
        val req = Domain.lookup id;
        val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
 
 
-<form action="domain">
+<form action="domain" method="post">
 <input type="hidden" name="save" value="<% id %>">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Requestor</b>:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
-<tr> <td align="right"><b>Time</b>:</td> <td><% #stamp req %></td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><select name="status">
+<table class="blanks">
+<tr> <td>Requestor:</td> <td><a href="user?id=<% #usr req %>"><% #name user %></a></td> </tr>
+<tr> <td>Time:</td> <td><% #stamp req %></td> </tr>
+<tr> <td>Status</b>:</td> <td><select name="status">
        <option value="0"<% if #status req = Domain.NEW then %> selected<% end %>>New</option>
        <option value="1"<% if #status req = Domain.INSTALLED then %> selected<% end %>>Installed</option>
        <option value="2"<% if #status req = Domain.REJECTED then %> selected<% end %>>Rejected</option>
 </select></td> </tr>
        <option value="0"<% if #status req = Domain.NEW then %> selected<% end %>>New</option>
        <option value="1"<% if #status req = Domain.INSTALLED then %> selected<% end %>>Installed</option>
        <option value="2"<% if #status req = Domain.REJECTED then %> selected<% end %>>Rejected</option>
 </select></td> </tr>
-<tr> <td align="right"><b>Domain</b>:</td> <td><input name="dom" value="<% #data req %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
+<tr> <td>Domain:</td> <td><input name="dom" value="<% #data req %>"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" rows="10" cols="80" wrap="soft"><% Web.html (#msg req) %></textarea></td> </tr>
 <tr> <td><input type="submit" value="Save"></td> </tr>
 </table>
 </form>
 <tr> <td><input type="submit" value="Save"></td> </tr>
 </table>
 </form>
@@ -88,10 +88,10 @@ elseif $"mod" <> "" then
        Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus};
        if oldStatus <> newStatus then
                if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
        Domain.modify {req with data = $"dom", msg = $"msg", status = newStatus};
        if oldStatus <> newStatus then
                if not (Domain.notifyMod (oldStatus, newStatus, Init.getUserName(), id)) then
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                end
        end
                end
        end
-       %><h3><b>Request modified</b></h3>
+       %><h3>Request modified</h3>
        Back to: <a href="domain?cmd=open">open requests</a>, <a href="domain?cmd=list">all requests</a>
 
 <% elseif $"del" <> "" then
        Back to: <a href="domain?cmd=open">open requests</a>, <a href="domain?cmd=list">all requests</a>
 
 <% elseif $"del" <> "" then
@@ -99,26 +99,26 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"del");
        val req = Domain.lookup id;
        val user = Init.lookupUser (#usr req)
        val id = Web.stoi ($"del");
        val req = Domain.lookup id;
        val user = Init.lookupUser (#usr req)
-       %><h3><b>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</b></h3>
+       %><h3>Are you sure you want to delete request by <% #name user %> for <tt><% #data req %></tt>?</h3>
        <a href="domain?del2=<% id %>">Yes, I'm sure!</a>
 
 <% elseif $"del2" <> "" then
        Group.requireGroupName "server";
        val id = Web.stoi ($"del2");
        Domain.delete id
        <a href="domain?del2=<% id %>">Yes, I'm sure!</a>
 
 <% elseif $"del2" <> "" then
        Group.requireGroupName "server";
        val id = Web.stoi ($"del2");
        Domain.delete id
-       %><h3><b>Request deleted</b><h3>
+       %><h3>Request deleted</b><h3>
        Back to: <a href="domain?cmd=open">open requests</a>, <a href="domain?cmd=list">all requests</a>
 
 <% else %>
 
        Back to: <a href="domain?cmd=open">open requests</a>, <a href="domain?cmd=list">all requests</a>
 
 <% else %>
 
-<h3><b>Request new domain</b></h3>
+<h3>Request new domain</h3>
 
 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.
 
 
 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.
 
-<form action="domain">
-<table>
-<tr> <td align="right" valign="top"><b>Domain</b>:</td> <td><input name="req"></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
+<form action="domain" method="post">
+<table class="blanks">
+<tr> <td>Domain:</td> <td><input name="req"></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" rows="5" cols="80" wrap="soft"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Request"></td> </tr>
 </table>
 </form>
 <tr> <td><input type="submit" value="Request"></td> </tr>
 </table>
 </form>