Add new style and fix up HTML to avoid boilerplate
authoradamch <adamch>
Thu, 24 Nov 2005 19:45:27 +0000 (19:45 +0000)
committeradamch <adamch>
Thu, 24 Nov 2005 19:45:27 +0000 (19:45 +0000)
31 files changed:
Makefile [new file with mode: 0644]
apps.mlt
apt.mlt
balances.mlt
contact.mlt
domain.mlt
exn.mlt
footer.mlt
footer.mlt.in [new file with mode: 0644]
groups.mlt
header.mlt
header.mlt.in [new file with mode: 0644]
header.setTitle [new file with mode: 0644]
issue.mlt
kind.mlt
link.mlt
list.mlt
location.mlt
money.mlt
poll.mlt
portal.mlt
pref.mlt
roll.mlt
sec.mlt
static/gen.sml
support.mlt
user.mlt
users.mlt
vmailpasswd/Makefile [new file with mode: 0644]
vmailpasswd/passwd.mlt
vmailpasswd/passwd.mlt.in [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..3231768
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,10 @@
+all: header.mlt footer.mlt
+
+header.mlt: /etc/hcoop.header header.setTitle header.mlt.in
+       cat header.setTitle >header.mlt
+       hcoop_header "<% Web.html title %>" >>header.mlt
+       cat header.mlt.in >>header.mlt
+
+footer.mlt: /etc/hcoop.footer footer.mlt.in
+       cat footer.mlt.in >footer.mlt
+       hcoop_footer >>footer.mlt
index c75781e..af6e1bf 100644 (file)
--- a/apps.mlt
+++ b/apps.mlt
@@ -9,15 +9,15 @@ ref showNormal = true;
 if $"vote" <> "" then
        Group.requireGroupName "board";
        App.vote (you, Web.stoi ($"vote"))
-       %><h3><b>Vote registered</b></h3><%
+       %><h3>Vote registered</h3><%
 elseif $"unvote" <> "" then
        Group.requireGroupName "board";
        App.unvote (you, Web.stoi ($"unvote"))
-       %><h3><b>Unvote registered</b></h3><%
+       %><h3>Unvote registered</h3><%
 elseif $"deny" <> "" then
        showNormal := false;
        val appl = App.lookupApp (Web.stoi ($"deny"))
-       %><h3><b>Deny application for <% #name appl %></b></h3>
+       %><h3>Deny application for <% #name appl %></h3>
        <form action="apps" method="post">
        <input type="hidden" name="deny2" value="<% $"deny" %>">
        <b>Reason</b>:<br>
@@ -27,14 +27,14 @@ elseif $"deny" <> "" then
 elseif $"deny2" <> "" then
        Group.requireGroupName "board";
        if not (App.deny (Web.stoi ($"deny2"), $"msg")) then
-               %><h3><b>Error denying application</b></h3><%
+               %><h3>Error denying application</h3><%
        else
-               %><h3><b>Application denied</b></h3><%
+               %><h3>Application denied</h3><%
        end
 elseif $"approve" <> "" then
        showNormal := false;
        val appl = App.lookupApp (Web.stoi ($"approve"))
-       %><h3><b>Approve application for <% #name appl %></b></h3>
+       %><h3>Approve application for <% #name appl %></h3>
        <form action="apps" method="post">
        <input type="hidden" name="approve2" value="<% $"approve" %>">
        <b>Message</b>:<br>
@@ -44,20 +44,20 @@ elseif $"approve" <> "" then
 elseif $"approve2" <> "" then
        Group.requireGroupName "board";
        if not (App.approve (Web.stoi ($"approve2"), $"msg")) then
-               %><h3><b>Error approving application</b></h3><%
+               %><h3>Error approving application</h3><%
        else
-               %><h3><b>Application approved</b></h3><%
+               %><h3>Application approved</h3><%
        end
 elseif $"cmd" = "approved" then
        showNormal := false
 
-       %><h3><b>Pending applications</b></h3><%
+       %><h3>Pending applications</h3><%
 
        foreach appl in App.listApps App.ACCEPTED do %>
                <br><hr><br>
-               <table>
-               <tr> <td align="right"><b>Received</b>:</td> <td><% #applied appl %></td> </tr>
-               <tr> <td align="right"><b>Approved by</b>:</td> <td><%
+               <table class="blanks">
+               <tr> <td>Received:</td> <td><% #applied appl %></td> </tr>
+               <tr> <td>Approved by:</td> <td><%
                        ref first = true;
                        ref found = false;
                        foreach (id, name) in App.votes (#id appl) do
@@ -68,12 +68,12 @@ elseif $"cmd" = "approved" then
                                end
                                %><a href="user?id=<% id %>"><% name %></a><%
                        end %> </td> </tr>
-       <tr> <td align="right"><b>Username</b>:</td> <td><% #name appl %></td> </tr>
-       <tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname appl) %></td> </tr>
-       <tr> <td align="right"><b>E-mail address</b>:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
-       <tr> <td align="right"><b>Forward e-mail?</b></td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
-       <tr> <td align="right" valign="top"><b>Proposed uses</b>:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
-       <tr> <td align="right" valign="top"><b>Other information</b>:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
+       <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
+       <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
+       <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
+       <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
+       <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
+       <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
        </table>
 
        <% if root then %>
@@ -94,19 +94,19 @@ First, create this UNIX user:
 
 <form action="users" method="post">
 <input type="hidden" name="app" value="<% #id appl %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name appl) %>"></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><input name="rname" value="<% Web.html (#rname appl) %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Funded by</b>:</td> <td><select name="bal">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name appl) %>"></td> </tr>
+<tr> <td>Real name:</td> <td><input name="rname" value="<% Web.html (#rname appl) %>"></td> </tr>
+<tr> <td>Funded by:</td> <td><select name="bal">
        <option value="">A new balance</option>
 <% foreach bal in Balance.listBalances () do %>
        <option value="<% #id bal %>"><% Web.html (#name bal) %></option>
 <% end %>
 </select></td></tr>
-<tr> <td align="right"><b>Initial transaction amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right"><b>Initial transaction description</b>:</td> <td><input name="descr" value="PayPal"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr>
-<tr> <td align="right"><b>Groups</b>:</td> <td><select name="grp" size="5" multiple>
+<tr> <td>Initial transaction amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Initial transaction description:</td> <td><input name="descr" value="PayPal"></td> </tr>
+<tr> <td><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr>
+<tr> <td>Groups:</td> <td><select name="grp" size="5" multiple>
 <% foreach group in Group.listGroups () do %>
        <option value="<% #id group %>"<% if #name group = "paying" then %> selected<% end %>><% Web.html (#name group) %></option>
 <% end %>
@@ -119,18 +119,18 @@ First, create this UNIX user:
 
 <% elseif $"abort" <> "" then
        App.abortAdd (Web.stoi ($"abort"))
-       %><h3><b>Aborted</b></h3><%
+       %><h3>Aborted</h3><%
 
 end %>
 
 <% if showNormal then %>
-<h3><b>Pending applications</b></h3>
+<h3>Pending applications</h3>
 
 <% foreach appl in App.listApps App.PENDING do %>
        <br><hr><br>
-       <table>
-       <tr> <td align="right"><b>Received</b>:</td> <td><% #applied appl %></td> </tr>
-       <tr> <td align="right"><b>Approved by</b>:</td> <td><%
+       <table class="blanks">
+       <tr> <td>Received:</td> <td><% #applied appl %></td> </tr>
+       <tr> <td>Approved by:</td> <td><%
                ref first = true;
                ref found = false;
                val votes = App.votes (#id appl);
@@ -146,12 +146,12 @@ end %>
                                %> <a href="apps?unvote=<% #id appl %>">[Unvote]</a><%
                        end
                end %> <% if (iff board then not found else false) then %><a href="apps?vote=<% #id appl %>">[Vote]</a><% end %></td> </tr>
-       <tr> <td align="right"><b>Username</b>:</td> <td><% #name appl %></td> </tr>
-       <tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname appl) %></td> </tr>
-       <tr> <td align="right"><b>E-mail address</b>:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
-       <tr> <td align="right"><b>Forward e-mail?</b></td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
-       <tr> <td align="right" valign="top"><b>Proposed uses</b>:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
-       <tr> <td align="right" valign="top"><b>Other information</b>:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
+       <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
+       <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
+       <tr> <td>E-mail address:</td> <td><a href="mailto:<% #email appl %>"><% #email appl %></a></td> </tr>
+       <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
+       <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
+       <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
        </table>
 
        <% if board then %>
diff --git a/apt.mlt b/apt.mlt
index 65c9d76..0679155 100644 (file)
--- a/apt.mlt
+++ b/apt.mlt
@@ -58,21 +58,21 @@ elseif $"req" <> "" then
        if ok then
                val id = Apt.add (Init.getUserId(), $"req", $"msg");
                if not (Apt.notifyNew id) then
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                end
-               %><h3><b>Request added</b></h3><%
+               %><h3>Request added</h3><%
        end
 
 elseif $"cmd" = "open" then
-       %><h3><b>Open requests</b></h3>
+       %><h3>Open requests</h3>
        <a href="apt?cmd=list">List all requests</a><%
 
        foreach (name, req) in Apt.listOpen () 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>Packages</b>:</td><%
+<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>Packages:</td><%
        ref first = true;
 
        val pkgs = String.tokens Char.isSpace (#data req);
@@ -92,7 +92,7 @@ elseif $"cmd" = "open" then
                end
        end %>
 </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <% if admin then %>
@@ -105,14 +105,14 @@ elseif $"cmd" = "open" then
 <%     end
 
 elseif $"cmd" = "list" then
-       %><h3><b>All requests</b></h3><%
+       %><h3>All requests</h3><%
 
        foreach (name, req) in Apt.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>Packages</b>:</td><%
+<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>Packages:</td><%
        ref first = true;
 
        val pkgs = String.tokens Char.isSpace (#data req);
@@ -132,7 +132,7 @@ elseif $"cmd" = "list" then
                end
        end %>
 </tr>
-<tr> <td align="right" valign="top"><b>Reason</b>:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <% if admin then %>
@@ -148,20 +148,20 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"mod");
        val req = Apt.lookup id;
        val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
 
 <form action="apt" method="post">
 <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:</td> <td><select name="status">
        <option value="0"<% if #status req = Apt.NEW then %> selected<% end %>>New</option>
        <option value="1"<% if #status req = Apt.INSTALLED then %> selected<% end %>>Installed</option>
        <option value="2"<% if #status req = Apt.REJECTED then %> selected<% end %>>Rejected</option>
 </select></td> </tr>
-<tr> <td align="right" valign="top"><b>Packages</b>:</td> <td><textarea name="pkgs" rows="5" cols="40" wrap="soft"><% Web.html (#data req) %></textarea></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>Packages:</td> <td><textarea name="pkgs" rows="5" cols="40" wrap="soft"><% Web.html (#data req) %></textarea></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>
@@ -175,10 +175,10 @@ elseif $"mod" <> "" then
        Apt.modify {req with data = $"pkgs", msg = $"msg", status = newStatus};
        if oldStatus <> newStatus then
                if not (Apt.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
-       %><h3><b>Request modified</b></h3>
+       %><h3>Request modified</h3>
        Back to: <a href="apt?cmd=open">open requests</a>, <a href="apt?cmd=list">all requests</a>
 
 <% elseif $"del" <> "" then
@@ -186,26 +186,26 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"del");
        val req = Apt.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="apt?del2=<% id %>">Yes, I'm sure!</a>
 
 <% elseif $"del2" <> "" then
        Group.requireGroupName "server";
        val id = Web.stoi ($"del2");
        Apt.delete id
-       %><h3><b>Request deleted</b><h3>
+       %><h3>Request deleted</b><h3>
        Back to: <a href="apt?cmd=open">open requests</a>, <a href="apt?cmd=list">all requests</a>
 
 <% else %>
 
-<h3><b>Request new installations</b></h3>
+<h3>Request new installations</h3>
 
 List the package names you'd like, separated by any whitespace characters.
 
 <form action="apt" method="post">
-<table>
-<tr> <td align="right" valign="top"><b>Packages</b>:</td> <td><textarea name="new" rows="10" cols="40" wrap="soft"></textarea></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>
+<table class="blanks">
+<tr> <td>Packages:</td> <td><textarea name="new" rows="10" cols="40" wrap="soft"></textarea></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>
index a6b9352..d565cca 100644 (file)
@@ -6,24 +6,24 @@ ref showNormal = true;
 
 if $"cmd" = "Create" then
        if not (Balance.validBalanceName ($"name")) then %>
-               <h3><b>Invalid balance name</b></h3>
+               <h3>Invalid balance name</h3>
        <% else switch Balance.balanceNameToId ($"name") of
                  SOME _ => %>
-                       <h3><b>Balance name already in use</b></h3>
+                       <h3>Balance name already in use</h3>
 <%             | NONE =>
                        val id = Balance.addBalance ($"name") %>
-                       <h3><b>Balance added</b></h3>
+                       <h3>Balance added</h3>
 <%             end
        end
 elseif $"mod" <> "" then
        showNormal := false;
        val balance = Balance.lookupBalance (Web.stoi ($"mod")) %>
-<h3><b>Modify balance record</b></h3>
+<h3>Modify balance record</h3>
 
 <form action="balances" method="post">
 <input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% #name balance %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% #name balance %>"></td> </tr>
 <tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
 </table>
 </form>
@@ -31,33 +31,33 @@ elseif $"mod" <> "" then
 <% elseif $"cmd" = "Save" then
        val balance = Balance.lookupBalance (Web.stoi ($"id"));
        Balance.modBalance {balance with name = $"name"} %>
-       <h3><b>Balance record saved.</b></h3>
+       <h3>Balance record saved.</h3>
 
 <% elseif $"del" <> "" then
        showNormal := false;
        val balance = Balance.lookupBalance (Web.stoi ($"del")) %>
-       <h3><b>Are you sure you want to delete balance <% #name balance %></a>?</b></h3>
+       <h3>Are you sure you want to delete balance <% #name balance %></a>?</h3>
        <a href="balances?del2=<% $"del" %>">Yes, delete <% #name balance %>!</a>
 
 <% elseif $"del2" <> "" then
        val balance = Balance.lookupBalance (Web.stoi ($"del2"));
        Balance.deleteBalance (Web.stoi ($"del2")) %>
-       <h3><b><% #name balance %> deleted!</b></h3>
+       <h3><% #name balance %> deleted!</h3>
 
 <% end %>
 
 <% if showNormal then
        ref total = 0.0 %>
-<h3><b>New balance</b></h3>
+<h3>New balance</h3>
 
 <form action="balances" method="post">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
 <tr> <td><input type="submit" name="cmd" value="Create"></td> </tr>
 </table>
 </form>
 
-<h3><b>Manage current balances</b></h3>
+<h3>Manage current balances</h3>
 
 <table>
 <% foreach balance in Balance.listBalances () do
index d7d0fd8..905b9c7 100644 (file)
@@ -4,25 +4,25 @@ ref showNormal = true;
 
 if $"cmd" = "add" then
        val id = Contact.addContact (Init.getUserId(), Web.stoi ($"knd"), $"v", Contact.privFromInt (Web.stoi ($"priv"))) %>
-       <h3><b>Contact added</b></h3>
+       <h3>Contact added</h3>
 
 <% elseif $"mod" <> "" then
        showNormal := false;
        val id = Web.stoi ($"mod");
        val cont = Contact.lookupContact id %>
 
-<h3><b>Modify contact entry</b></h3>
+<h3>Modify contact entry</h3>
 
 <form action="contact" method="post">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Kind</b>:</td> <td><select name="knd">
+<table class="blanks">
+<tr> <td>Kind:</td> <td><select name="knd">
 <% foreach kind in Contact.listKinds () do %>
        <option value="<% #id kind %>"<% if #knd cont = #id kind then %> selected<% end %>><% Web.html (#name kind) %></option>
 <% end %>
 </select></td> </tr>
-<tr> <td align="right"><b>Value</b>:</td> <td><input name="v" value="<% Web.html (#v cont) %>"></td> </tr>
-<tr> <td align="right"><b>Readable by</b>:</td> <td><select name="priv">
+<tr> <td>Value:</td> <td><input name="v" value="<% Web.html (#v cont) %>"></td> </tr>
+<tr> <td>Readable by:</td> <td><select name="priv">
        <option value="0"<% if #priv cont = Contact.PUBLIC then %> selected<% end %>>Anyone</option>
        <option value="1"<% if #priv cont = Contact.MEMBERS then %> selected<% end %>>Members only</option>
        <option value="2"<% if #priv cont = Contact.ADMINS then %> selected<% end %>>Admins only</option>
@@ -35,37 +35,37 @@ if $"cmd" = "add" then
        val id = Web.stoi ($"save");
        val cont = Contact.lookupContact id;
        Contact.modContact {cont with knd = Web.stoi ($"knd"), v = $"v", priv = Contact.privFromInt (Web.stoi ($"priv"))} %>
-       <h3><b>Contact entry saved</b></h3>
+       <h3>Contact entry saved</h3>
 
 <% elseif $"del" <> "" then
        showNormal := false;
        val id = Web.stoi ($"del");
        val cont = Contact.lookupContact id %>
-       <h3><b>Are you sure you want to delete contact entry "<% Web.html (#v cont) %>"?</b></h3>
+       <h3>Are you sure you want to delete contact entry "<% Web.html (#v cont) %>"?</h3>
        <a href="contact?del2=<% id %>">Yes, delete "<% Web.html (#v cont) %>"!</a>
 
 <% elseif $"del2" <> "" then
        val id = Web.stoi ($"del2");
        val cont = Contact.lookupContact id;
        Contact.deleteContact id %>
-       <h3><b>Contact entry "<% Web.html (#v cont) %>" deleted</b></h3>
+       <h3>Contact entry "<% Web.html (#v cont) %>" deleted</h3>
 
 <% end;
 
 if showNormal then %>
 
-<h3><b>Add new contact information</b></h3>
+<h3>Add new contact information</h3>
 
 <form action="contact" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Kind</b>:</td> <td><select name="knd">
+<table class="blanks">
+<tr> <td>Kind:</td> <td><select name="knd">
 <% foreach kind in Contact.listKinds () do %>
        <option value="<% #id kind %>"><% Web.html (#name kind) %></option>
 <% end %>
 </select></td> </tr>
-<tr> <td align="right"><b>Value</b>:</td> <td><input name="v"></td> </tr>
-<tr> <td align="right"><b>Readable by</b>:</td> <td><select name="priv">
+<tr> <td>Value:</td> <td><input name="v"></td> </tr>
+<tr> <td>Readable by:</td> <td><select name="priv">
        <option value="0">Anyone</option>
        <option value="1" selected>Members only</option>
        <option value="2">Admins only</option>
@@ -74,11 +74,11 @@ if showNormal then %>
 </table>
 </form>
 
-<h3><b>Your contact information</b></h3>
+<h3>Your contact information</h3>
 
-<table>
+<table class="blanks">
 <% foreach (kind, cont) in Contact.listUserContacts (Init.getUserId(), Contact.ADMINS) do %>
-       <tr> <td align="right" valign="top"><b><% Web.html (#name kind) %></b>:</td>
+       <tr> <td><% Web.html (#name kind) %>:</td>
        <td><% Contact.format (kind, cont) %></td>
        <td><i><% switch #priv cont of
                  Contact.PUBLIC => %>Public<%
index eb4c4b5..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
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                end
-               %><h3><b>Request added</b></h3><%
+               %><h3>Request added</h3><%
        else
-               %><h3><b>Invalid domain name</b></h3><%
+               %><h3>Invalid domain name</h3><%
        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>
-<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 %>
@@ -37,15 +37,15 @@ elseif $"cmd" = "open" 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>
-<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 %>
@@ -61,20 +61,20 @@ elseif $"mod" <> "" then
        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" method="post">
 <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>
-<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>
@@ -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
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                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
@@ -99,26 +99,26 @@ elseif $"mod" <> "" then
        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
-       %><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 %>
 
-<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.
 
 <form action="domain" method="post">
-<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>
+<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>
diff --git a/exn.mlt b/exn.mlt
index 8e534a4..7987ad6 100644 (file)
--- a/exn.mlt
+++ b/exn.mlt
@@ -2,7 +2,7 @@
 <title>Hcoop Portal: Exception</title>
 </head><body>
 
-<h1><b>Exception</b></h1>
+<h1>Exception</h1>
 
 <% switch Web.getExn () of
      Fail msg => %>
index 8634a86..c1deb5b 100644 (file)
@@ -1 +1,6 @@
-</body></html>
\ No newline at end of file
+</div>
+
+</div>
+</div>
+
+</body></html>
diff --git a/footer.mlt.in b/footer.mlt.in
new file mode 100644 (file)
index 0000000..5343723
--- /dev/null
@@ -0,0 +1,3 @@
+</div>
+
+</div>
index 25f86b7..2868d1b 100644 (file)
@@ -6,24 +6,24 @@ ref showNormal = true;
 
 if $"cmd" = "Create" then
        if not (Group.validGroupName ($"name")) then %>
-               <h3><b>Invalid group name</b></h3>
+               <h3>Invalid group name</h3>
        <% else switch Group.groupNameToId ($"name") of
                  SOME _ => %>
-                       <h3><b>Group name already in use</b></h3>
+                       <h3>Group name already in use</h3>
 <%             | NONE =>
                        val id = Group.addGroup ($"name") %>
-                       <h3><b>Group added</b></h3>
+                       <h3>Group added</h3>
 <%             end
        end
 elseif $"mod" <> "" then
        showNormal := false;
        val group = Group.lookupGroup (Web.stoi ($"mod")) %>
-<h3><b>Modify group record</b></h3>
+<h3>Modify group record</h3>
 
 <form action="groups" method="post">
 <input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% #name group %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% #name group %>"></td> </tr>
 <tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
 </table>
 </form>
@@ -31,50 +31,50 @@ elseif $"mod" <> "" then
 <% elseif $"cmd" = "Save" then
        val group = Group.lookupGroup (Web.stoi ($"id"));
        Group.modGroup {group with name = $"name"} %>
-       <h3><b>Group record saved.</b></h3>
+       <h3>Group record saved.</h3>
 
 <% elseif $"del" <> "" then
        showNormal := false;
        val group = Group.lookupGroup (Web.stoi ($"del")) %>
-       <h3><b>Are you sure you want to delete group <% #name group %>?</b></h3>
+       <h3>Are you sure you want to delete group <% #name group %>?</h3>
        <a href="groups?del2=<% $"del" %>">Yes, delete <% #name group %>!</a>
 
 <% elseif $"del2" <> "" then
        val group = Group.lookupGroup (Web.stoi ($"del2"));
        Group.deleteGroup (Web.stoi ($"del2")) %>
-       <h3><b><% #name group %> deleted!</b></h3>
+       <h3><% #name group %> deleted!</h3>
 
 <% elseif $"cmd" = "Grant" then
        Group.addToGroup {usr = Web.stoi ($"usr"), grp = Web.stoi ($"grp")} %>
-       <h3><b>Membership granted.</b></h3>
+       <h3>Membership granted.</h3>
 
 <% elseif $"revoke" <> "" then
        Group.removeFromGroup {usr = Web.stoi ($"revoke"), grp = Web.stoi ($"grp")} %>
-       <h3><b>Membership revoked.</b></h3>
+       <h3>Membership revoked.</h3>
 
 <% end %>
 
 <% if showNormal then %>
 
-<h3><b>Create group</b></h3>
+<h3>Create group</h3>
 
 <form action="groups" method="post">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
 <tr> <td><input type="submit" name="cmd" value="Create"></td> </tr>
 </table>
 </form>
 
-<h3><b>Grant membership</b></h3>
+<h3>Grant membership</h3>
 
 <form action="groups" method="post">
-<table>
-<tr> <td align="right"><b>Group</b>:</td> <td><select name="grp">
+<table class="blanks">
+<tr> <td>Group:</td> <td><select name="grp">
 <% foreach group in Group.listGroups () do %>
        <option value="<% #id group %>"><% Web.html (#name group) %></option>
 <% end %>
 </select></td> </tr>
-<tr> <td align="right"><b>Member</b>:</td> <td><select name="usr">
+<tr> <td>Member:</td> <td><select name="usr">
 <% foreach user in Init.listUsers () do %>
        <option value="<% #id user %>"><% Web.html (#name user) %></option>
 <% end %>
@@ -83,7 +83,7 @@ elseif $"mod" <> "" then
 </table>
 </form>
 
-<h3><b>Manage current groups</b></h3>
+<h3>Manage current groups</h3>
 
 <table>
 <% foreach group in Group.listGroups () do %>
index 12510cc..25dc60a 100644 (file)
@@ -1,11 +1,82 @@
-<html><head>
 <% val title =
        case $"title" of
                  "" => "HCoop Portal"
                | t => ("HCoop Portal: " ^ t) %>
+<html><head>
+<link rel="stylesheet" type="text/css" href="http://hcoop.net/hcoop.css" />
 <title><% Web.html title %></title>
 </head><body>
 
-<a href="portal">Return to main page</a>
+<div class="main">
+
+<div class="title">
+<img class="globe" src="http://hcoop.net/globe.gif" />
+<h1><% Web.html title %></h1>
+</div>
+
+<div class="break"></div>
+<div class="sidebar">
+
+<% if Group.inGroupNum 0 then %>
+<div class="sbgroup">
+Admin<br />
+<li> <a href="apps?cmd=approved">Approved applicants waiting for accounts</a></li>
+<li> <a href="users">Members</a></li>
+<li> <a href="groups">Groups</a></li>
+<li> <a href="balances">Balances</a></li>
+<li> <a href="kind">Contact kinds</a></li>
+<li> <a href="roll">Roll call!</a></li>
+</div>
+<% end %>
+
+<div class="sbgroup">
+Your account<br />
+<li> <a href="pref">Preferences</a></li>
+<li> <a href="money">Financial</a></li>
+<li> <a href="sec">Security settings</a></li>
+<li> <a href="contact">Contact information</a></li>
+<li> <a href="location">Your geographic locations</a></li>
+<li> <a href="link">Public URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Support requests<br />
+<li> <a href="domain">Request control of a domain with domtool</a></li>
+<li> <a href="apt">Request Debian apt packages</a></li>
+<li> <a href="list">Request a Mailman mailing list</a></li>
+<li> <a href="support">Other support request</a></li>
+</div>
+
+<div class="sbgroup">
+Statistics<br />
+<li> <a href="webbw">Apache bandwidth</a></li>
+<li> <a href="quotas">Disk usage</a></li>
+</div>
+
+<div class="sbgroup">
+Public pages<br />
+<li> <a href="http://hcoop.net/dyn/members.html">Member directory</a></li>
+<li> <a href="http://hcoop.net/dyn/locs.html">Member location summary</a></li>
+<li> <a href="http://hcoop.net/dyn/sites.html">URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Miscellaneous<br />
+<li> <a href="apps">Review pending membership applications</a></li>
+<li> <a href="dir">Contact information directory</a></li>
+<li> <a href="poll">Polls</a></li>
+</div>
+
+<div class="sbgroup">
+Other services<br />
+<li> <a href="/webalizer/">Webalizer</a></li>
+<li> <a href="/mrtg/">MRTG statistics</a></li>
+<li> <a href="http://nms.interserver.net/cac/nms.php?server_name=bmV3Lmhjb29wLm5ldA==">InterServer bandwidth statistics</a></li>
+<li> <a href="/usermin/">Usermin</a></li>
+<li> <a href="/squirrel/">SquirrelMail</a></li>
+<li> <a href="/passwd">Change vmail passwords</a></li>
+</div>
+
+</div>
 
-<h2><b><% Web.html title %></b></h2>
+<div class="main2">
diff --git a/header.mlt.in b/header.mlt.in
new file mode 100644 (file)
index 0000000..eb94724
--- /dev/null
@@ -0,0 +1,65 @@
+<div class="sidebar">
+
+<% if Group.inGroupNum 0 then %>
+<div class="sbgroup">
+Admin<br />
+<li> <a href="apps?cmd=approved">Approved applicants waiting for accounts</a></li>
+<li> <a href="users">Members</a></li>
+<li> <a href="groups">Groups</a></li>
+<li> <a href="balances">Balances</a></li>
+<li> <a href="kind">Contact kinds</a></li>
+<li> <a href="roll">Roll call!</a></li>
+</div>
+<% end %>
+
+<div class="sbgroup">
+Your account<br />
+<li> <a href="pref">Preferences</a></li>
+<li> <a href="money">Financial</a></li>
+<li> <a href="sec">Security settings</a></li>
+<li> <a href="contact">Contact information</a></li>
+<li> <a href="location">Your geographic locations</a></li>
+<li> <a href="link">Public URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Support requests<br />
+<li> <a href="domain">Request control of a domain with domtool</a></li>
+<li> <a href="apt">Request Debian apt packages</a></li>
+<li> <a href="list">Request a Mailman mailing list</a></li>
+<li> <a href="support">Other support request</a></li>
+</div>
+
+<div class="sbgroup">
+Statistics<br />
+<li> <a href="webbw">Apache bandwidth</a></li>
+<li> <a href="quotas">Disk usage</a></li>
+</div>
+
+<div class="sbgroup">
+Public pages<br />
+<li> <a href="http://hcoop.net/dyn/members.html">Member directory</a></li>
+<li> <a href="http://hcoop.net/dyn/locs.html">Member location summary</a></li>
+<li> <a href="http://hcoop.net/dyn/sites.html">URL directory</a></li>
+</div>
+
+<div class="sbgroup">
+Miscellaneous<br />
+<li> <a href="apps">Review pending membership applications</a></li>
+<li> <a href="dir">Contact information directory</a></li>
+<li> <a href="poll">Polls</a></li>
+</div>
+
+<div class="sbgroup">
+Other services<br />
+<li> <a href="/webalizer/">Webalizer</a></li>
+<li> <a href="/mrtg/">MRTG statistics</a></li>
+<li> <a href="http://nms.interserver.net/cac/nms.php?server_name=bmV3Lmhjb29wLm5ldA==">InterServer bandwidth statistics</a></li>
+<li> <a href="/usermin/">Usermin</a></li>
+<li> <a href="/squirrel/">SquirrelMail</a></li>
+<li> <a href="/passwd">Change vmail passwords</a></li>
+</div>
+
+</div>
+
+<div class="main2">
diff --git a/header.setTitle b/header.setTitle
new file mode 100644 (file)
index 0000000..1c2a723
--- /dev/null
@@ -0,0 +1,4 @@
+<% val title =
+       case $"title" of
+                 "" => "HCoop Portal"
+               | t => ("HCoop Portal: " ^ t) %>
index 0a5414e..b6924ac 100644 (file)
--- a/issue.mlt
+++ b/issue.mlt
@@ -12,15 +12,15 @@ ref showNormal = true;
 if $"cmd" = "new" then
        showNormal := false %>
 
-<h3><b>New issue</b></h3>
+<h3>New issue</h3>
 
 <form action="issue" method="post">
 <input type="hidden" name="cat" value="<% catId %>">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="priv"></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><textarea name="body" rows="10" cols="80" wrap="soft"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td><input type="checkbox" name="priv"></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
+<tr> <td>Description:</td> <td><textarea name="body" rows="10" cols="80" wrap="soft"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </tr>
 </table>
 </form>
@@ -28,19 +28,19 @@ if $"cmd" = "new" then
 <% elseif $"cmd" = "add" then
        val title = $"title";
        if not (Support.validTitle title) then
-               %><h3><b>Invalid title</b></h3><%
+               %><h3>Invalid title</h3><%
        else
                val id = Support.addIssue (you, catId, title, $"priv" = "on", Support.NEW);
                val _ = Support.addPost (you, id, $"body");
                if not (Support.notifyCreation id) then
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                end;
                viewingIssue := SOME id
        end
 
 elseif $"cmd" = "list" then
        showNormal := false %>
-       <h3><b>All issues</b></h3>
+       <h3>All issues</h3>
 
 <table>
 <% foreach (name, issue) in Support.listCategoryIssues catId do
@@ -64,23 +64,23 @@ end %>
        val id = Web.stoi ($"mod");
        val issue = Support.lookupIssue id;
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not admin then
-               %><h3><b>You aren't authorized to modify that.</b></h3><%
+               %><h3>You aren't authorized to modify that.</h3><%
        else %>
-<h3><b>Modify issue</b></h3>
+<h3>Modify issue</h3>
 
 <form action="issue" method="post">
 <input type="hidden" name="cat" value="<% catId %>">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Category</b>:</td> <td><select name="newCat">
+<table class="blanks">
+<tr> <td>Category:</td> <td><select name="newCat">
 <% foreach cat in Support.listCategories () do %>
        <option value="<% #id cat %>"<% if #id cat = catId then %> selected<% end %>><% Web.html (#name cat) %></option>
 <% end %></select></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title issue) %>"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="priv"<% if #priv issue then %> checked<% end %>></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><select name="status">
+<tr> <td>Title>:</td> <td><input name="title" value="<% Web.html (#title issue) %>"></td> </tr>
+<tr> <td><input type="checkbox" name="priv"<% if #priv issue then %> checked<% end %>></td> <td>Only make this issue accessible to the admins for this support category.</td> </tr>
+<tr> <td>Status:</td> <td><select name="status">
        <option value="0"<% if #status issue = Support.NEW then %> selected<% end %>>New</option>
        <option value="1"<% if #status issue = Support.PENDING then %> selected<% end %>>Pending</option>
        <option value="2"<% if #status issue = Support.CLOSED then %> selected<% end %>>Closed</option>
@@ -99,13 +99,13 @@ elseif $"save" <> "" then
        val newCat = Support.lookupCategory (Web.stoi ($"newCat"));
 
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif (iff admin then not (Group.inGroupNum (#grp newCat)) else false) then
-               %><h3><b>Authorization failure</b></h3><%
+               %><h3>Authorization failure</h3><%
        elseif not (Support.validTitle title) then
-               %><h3><b>Invalid title</b></h3><%
+               %><h3>Invalid title</h3><%
        elseif (iff status < 0 then false else status > 2) then
-               %><h3><b>Invalid status</b></h3><%
+               %><h3>Invalid status</h3><%
        else
                val status = (case status of
                                  0 => Support.NEW
@@ -117,11 +117,11 @@ elseif $"save" <> "" then
                                status = status};
                if status <> oldStatus then
                        if not (Support.notifyStatus (you, oldStatus, status, id)) then
-                               %><h3><b>Error sending e-mail notification</b></h3><%
+                               %><h3>Error sending e-mail notification</h3><%
                        end
                end;
                viewingIssue := SOME id
-               %><h3><b>Issue saved</b></h3<%
+               %><h3>Issue saved</b></h3<%
        end
 
 elseif $"del" <> "" then
@@ -130,11 +130,11 @@ elseif $"del" <> "" then
        val issue = Support.lookupIssue id;
 
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not admin then
-               %><h3><b>Authorization failure</b></h3><%
+               %><h3>Authorization failure</h3><%
        else
-               %><h3><b>Are you sure you want to delete "<% Web.html (#title issue) %>"?</b></h3>
+               %><h3>Are you sure you want to delete "<% Web.html (#title issue) %>"?</h3>
                <a href="issue?cat=<% catId %>&del2=<% id %>">Yes, delete "<% Web.html (#title issue) %>"!</a><%
        end
 
@@ -143,12 +143,12 @@ elseif $"del2" <> "" then
        val issue = Support.lookupIssue id;
 
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not admin then
-               %><h3><b>Authorization failure</b></h3><%
+               %><h3>Authorization failure</h3><%
        else
                Support.deleteIssue id
-               %><h3><b>Issue "<% Web.html (#title issue) %>" deleted</b></h3><%
+               %><h3>Issue "<% Web.html (#title issue) %>" deleted</h3><%
        end
 
 elseif $"cmd" = "post" then
@@ -157,15 +157,15 @@ elseif $"cmd" = "post" then
        val issue = Support.lookupIssue id;
 
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not (Support.allowedToSee id) then
-               %><h3><b>Authorization failure</b></h3><%
+               %><h3>Authorization failure</h3><%
        else
                val id = Support.addPost (you, id, $"body");
                if not (Support.notifyPost id) then
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                end
-               %><h3><b>Posted</b></h3><%
+               %><h3>Posted</h3><%
        end
 
 elseif $"modPost" <> "" then
@@ -174,11 +174,11 @@ elseif $"modPost" <> "" then
        val post = Support.lookupPost id;
        val issue = Support.lookupIssue (#iss post);
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not admin then
-               %><h3><b>You aren't authorized to modify that.</b></h3><%
+               %><h3>You aren't authorized to modify that.</h3><%
        else %>
-<h3><b>Modify post</b></h3>
+<h3>Modify post</h3>
 
 <form action="issue" method="post">
 <input type="hidden" name="cat" value="<% catId %>">
@@ -194,13 +194,13 @@ elseif $"savePost" <> "" then
        val issue = Support.lookupIssue (#iss post);
 
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not admin then
-               %><h3><b>Authorization failure</b></h3><%
+               %><h3>Authorization failure</h3><%
        else
                Support.modPost {post with body = $"body"};
                viewingIssue := SOME (#iss post)
-               %><h3><b>Post saved</b></h3<%
+               %><h3>Post saved</b></h3<%
        end
 
 elseif $"delPost" <> "" then
@@ -210,11 +210,11 @@ elseif $"delPost" <> "" then
        val issue = Support.lookupIssue (#iss post);
 
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not admin then
-               %><h3><b>Authorization failure</b></h3><%
+               %><h3>Authorization failure</h3><%
        else
-               %><h3><b>Are you sure you want to delete this post?</b></h3>
+               %><h3>Are you sure you want to delete this post?</h3>
                <blockquote><% Web.htmlNl (#body post) %></blockquote>
                <a href="issue?cat=<% catId %>&delPost2=<% id %>">Yes, delete it!</a><%
        end
@@ -225,13 +225,13 @@ elseif $"delPost2" <> "" then
        val issue = Support.lookupIssue (#iss post);
 
        if catId <> #cat issue then
-               %><h3><b>Inconsistent cat field</b></h3><%
+               %><h3>Inconsistent cat field</h3><%
        elseif not admin then
-               %><h3><b>Authorization failure</b></h3><%
+               %><h3>Authorization failure</h3><%
        else
                Support.deletePost id;
                viewingIssue := SOME (#iss post)
-               %><h3><b>Post deleted</b></h3><%
+               %><h3>Post deleted</h3><%
        end
 
 elseif $"id" <> "" then
@@ -244,18 +244,18 @@ switch viewingIssue of
                val canEdit = Support.allowedToEdit id;
                val canView = Support.allowedToSee id;
                if catId <> #cat issue then
-                       %><h3><b>Inconsistent cat field</b></h3><%
+                       %><h3>Inconsistent cat field</h3><%
                elseif not canView then
-                       %><h3><b>You aren't authorized to view that.</b></h3><%
+                       %><h3>You aren't authorized to view that.</h3><%
                else
                        val user = Init.lookupUser (#usr issue) %>
 
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title issue) %></td> </tr>
-<tr> <td align="right"><b>Created by</b>:</td> <td><a href="user?id=<% #usr issue %>"><% #name user %></a></td> </tr>
-<tr> <td align="right"><b>At</b>:</td> <td><% #stamp issue %></td> </tr>
-<tr> <td align="right"><b>Private</b>:</td> <td><% if #priv issue then %>yes<% else %>no<% end %></td> </tr>
-<tr> <td align="right"><b>Status</b>:</td> <td><% switch #status issue of
+<table class="blanks">
+<tr> <td>Title:</td> <td><% Web.html (#title issue) %></td> </tr>
+<tr> <td>Created by:</td> <td><a href="user?id=<% #usr issue %>"><% #name user %></a></td> </tr>
+<tr> <td>At:</td> <td><% #stamp issue %></td> </tr>
+<tr> <td>Private:</td> <td><% if #priv issue then %>yes<% else %>no<% end %></td> </tr>
+<tr> <td>Status:</td> <td><% switch #status issue of
          Support.NEW => %>New<%
        | Support.PENDING => %>Pending<%
        | Support.CLOSED => %>Closed<%
@@ -281,7 +281,7 @@ foreach (name, post) in Support.listPosts id do %>
 
 <br><hr><br>
 
-<h3><b>Post to this thread</b></h3>
+<h3>Post to this thread</h3>
 
 <form action="issue" method="post">
 <input type="hidden" name="cat" value="<% catId %>">
@@ -299,7 +299,7 @@ if showNormal then %>
 <a href="issue?cat=<% catId %>&cmd=new">New issue</a><br>
 <a href="issue?cat=<% catId %>&cmd=list">List all issues</a>
 
-<h3><b>Open issues</b></h3>
+<h3>Open issues</h3>
 
 <table>
 <% val issues = iff admin then Support.listOpenCategoryIssuesAdmin catId
index 11ce043..b378d97 100644 (file)
--- a/kind.mlt
+++ b/kind.mlt
@@ -6,7 +6,7 @@ ref showNormal = true;
 
 if $"cmd" = "add" then
        val id = Contact.addKind ($"name", (iff $"url" = "on" then SOME ($"urlPrefix", $"urlPostfix") else NONE))
-       %> <h3><b>Contact kind added</b></h3>
+       %> <h3>Contact kind added</h3>
 
 <% elseif $"mod" <> "" then
        showNormal := false;
@@ -15,9 +15,9 @@ if $"cmd" = "add" then
 
 <form action="kind" method="post">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name kind) %>"></td> </tr>
-<tr> <td align="right"><b>URL pattern</b>:</td> <td><%
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name kind) %>"></td> </tr>
+<tr> <td>URL pattern:</td> <td><%
        switch #makeUrl kind of
                  NONE => %><input type="checkbox" name="url"> <input name="urlPrefix">...<input name="urlPostfix"><%
                | SOME (pre, post) => %><input type="checkbox" name="url" checked> <input name="urlPrefix" value="<% Web.html pre %>">...<input name="urlPostfix" value="<% Web.html post %>"><%
@@ -31,13 +31,13 @@ if $"cmd" = "add" then
        val id = Web.stoi ($"save");
        val kind = Contact.lookupKind id;
        Contact.modKind {kind with name = $"name", makeUrl = (iff $"url" = "on" then SOME ($"urlPrefix", $"urlPostfix") else NONE)}
-       %> <h3><b>Contact kind modified</b></h3>
+       %> <h3>Contact kind modified</h3>
 
 <% elseif $"del" <> "" then
        showNormal := false;
        val id = Web.stoi ($"del");
        val kind = Contact.lookupKind id %>
-       <h3><b>Are you sure you want to delete "<% Web.html (#name kind) %>"?</b></h3>
+       <h3>Are you sure you want to delete "<% Web.html (#name kind) %>"?</h3>
 
        <a href="kind?del2=<% $"del" %>">Yes, delete "<% Web.html (#name kind) %>"!</a>
 
@@ -45,24 +45,24 @@ if $"cmd" = "add" then
        val id = Web.stoi ($"del2");
        val kind = Contact.lookupKind id;
        Contact.deleteKind id %>
-       <h3><b>"<% Web.html (#name kind) %>" deleted</b></h3>
+       <h3>"<% Web.html (#name kind) %>" deleted</h3>
 
 <% end %>
 
 <% if showNormal then %>
 
-<h3><b>Add a contact kind</b></h3>
+<h3>Add a contact kind</h3>
 
 <form action="kind" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
-<tr> <td align="right"><b>URL pattern</b>:</td> <td><input type="checkbox" name="url"> <input name="urlPrefix">...<input name="urlPostfix"></td> </tr>
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
+<tr> <td>URL pattern:</td> <td><input type="checkbox" name="url"> <input name="urlPrefix">...<input name="urlPostfix"></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </tr>
 </table>
 </form>
 
-<h3><b>Current contact kinds</b></h3>
+<h3>Current contact kinds</h3>
 
 <table>
 <tr> <td><b>Kind</b></td> <td><b>URL pattern</b></td> </tr>
index e2943a9..adfd266 100644 (file)
--- a/link.mlt
+++ b/link.mlt
@@ -7,24 +7,24 @@ ref showNormal = true;
 
 if $"cmd" = "add" then
        val id = Link.addLink (you, $"title", $"url", $"descr") %>
-       <h3><b>Link added</b></h3>
+       <h3>Link added</h3>
 
 <% elseif $"mod" <> "" then
        val id = Web.stoi ($"mod");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't modify somebody else's link.</b></h3><%
+               %><h3>You can't modify somebody else's link.</h3><%
        else
                showNormal := false %>
 
-<h3><b>Modify link</b></h3>
+<h3>Modify link</h3>
 
 <form action="link" method="post">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title link) %>"></td> </tr>
-<tr> <td align="right"><b>URL</b>:</td> <td><input name="url" value="<% Web.html (#url link) %>"></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr link) %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title" value="<% Web.html (#title link) %>"></td> </tr>
+<tr> <td>URL:</td> <td><input name="url" value="<% Web.html (#url link) %>"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr link) %>"></td> </tr>
 <tr> <td><input type="submit" value="Save"></td> </t>
 </table>
 </form>
@@ -34,20 +34,20 @@ elseif $"save" <> "" then
        val id = Web.stoi ($"save");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't modify somebody else's link.</b></h3><%
+               %><h3>You can't modify somebody else's link.</h3><%
        else
                Link.modLink {link with title = $"title", url = $"url", descr = $"descr"}
-               %><h3><b>Link modified</b></h3><%
+               %><h3>Link modified</h3><%
        end
 
 elseif $"del" <> "" then
        val id = Web.stoi ($"del");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't delete somebody else's link.</b></h3><%
+               %><h3>You can't delete somebody else's link.</h3><%
        else
                showNormal := false %>
-               <h3><b>Are you sure you want to delete link to "<% Web.html (#title link) %>"?</b></h3>
+               <h3>Are you sure you want to delete link to "<% Web.html (#title link) %>"?</h3>
                <a href="link?del2=<% id %>">Yes, delete "<% Web.html (#title link) %>"!</a><%
        end
 
@@ -55,10 +55,10 @@ elseif $"del2" <> "" then
        val id = Web.stoi ($"del2");
        val link = Link.lookupLink id;
        if (iff admin then false else you <> #usr link) then
-               %><h3><b>You can't delete somebody else's link.</b></h3><%
+               %><h3>You can't delete somebody else's link.</h3><%
        else
                Link.deleteLink id;
-               %><h3><b>Link "<% Web.html (#title link) %>" deleted</b></h3><%
+               %><h3>Link "<% Web.html (#title link) %>" deleted</h3><%
        end
 end;
 
@@ -76,14 +76,14 @@ if showNormal then %>
 <% end %>
 </table>
 
-<h3><b>Add a link to a site you host with Hcoop</b></h3>
+<h3>Add a link to a site you host with Hcoop</h3>
 
 <form action="link" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right"><b>URL</b>:</td> <td><input name="url" value="http://"></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td>URL:</td> <td><input name="url" value="http://"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </t>
 </table>
 </form>
index 6ea2716..6658cbe 100644 (file)
--- a/list.mlt
+++ b/list.mlt
@@ -7,24 +7,24 @@ if $"req" <> "" then
        if Util.validEmail dom then
                val id = MailingList.add (Init.getUserId(), dom, $"msg");
                if not (MailingList.notifyNew id) then
-                       %><h3><b>Error sending e-mail notification</b></h3><%
+                       %><h3>Error sending e-mail notification</h3><%
                end
-               %><h3><b>Request added</b></h3><%
+               %><h3>Request added</h3><%
        else
-               %><h3><b>Invalid list e-mail address</b></h3><%
+               %><h3>Invalid list e-mail address</h3><%
        end
 
 elseif $"cmd" = "open" then
-       %><h3><b>Open requests</b></h3>
+       %><h3>Open requests</h3>
        <a href="list?cmd=list">List all requests</a><%
 
        foreach (name, req) in MailingList.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>List name</b>:</td> <td><% #data req %></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>List name:</td> <td><% #data req %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <% if admin then
@@ -38,15 +38,15 @@ elseif $"cmd" = "open" then
 <%     end
 
 elseif $"cmd" = "list" then
-       %><h3><b>All requests</b></h3><%
+       %><h3>All requests</h3><%
 
        foreach (name, req) in MailingList.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>List name</b>:</td> <td><% #data req %></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>List name:</td> <td><% #data req %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <% if admin then %>
@@ -62,20 +62,20 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"mod");
        val req = MailingList.lookup id;
        val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
 
 <form action="list" method="post">
 <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:</td> <td><select name="status">
        <option value="0"<% if #status req = MailingList.NEW then %> selected<% end %>>New</option>
        <option value="1"<% if #status req = MailingList.INSTALLED then %> selected<% end %>>Installed</option>
        <option value="2"<% if #status req = MailingList.REJECTED then %> selected<% end %>>Rejected</option>
 </select></td> </tr>
-<tr> <td align="right"><b>List name</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>List name:</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>
@@ -89,10 +89,10 @@ elseif $"mod" <> "" then
        MailingList.modify {req with data = $"dom", msg = $"msg", status = newStatus};
        if oldStatus <> newStatus then
                if not (MailingList.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
-       %><h3><b>Request modified</b></h3>
+       %><h3>Request modified</h3>
        Back to: <a href="list?cmd=open">open requests</a>, <a href="list?cmd=list">all requests</a>
 
 <% elseif $"del" <> "" then
@@ -100,28 +100,28 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"del");
        val req = MailingList.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="list?del2=<% id %>">Yes, I'm sure!</a>
 
 <% elseif $"del2" <> "" then
        Group.requireGroupName "lists";
        val id = Web.stoi ($"del2");
        MailingList.delete id
-       %><h3><b>Request deleted</b><h3>
+       %><h3>Request deleted</b><h3>
        Back to: <a href="list?cmd=open">open requests</a>, <a href="list?cmd=list">all requests</a>
 
 <% else %>
 
-<h3><b>Request new mailing list</b></h3>
+<h3>Request new mailing list</h3>
 
 <p>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.</p>
 
 <p>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, you should create a file <tt>.mailman</tt> in the domtool directory for this domain, before submitting a request. In that file, put the hostname of the vhost you want to use, and be sure to include a <tt>Mailman</tt> directive in that vhost's configuration.</p>
 
 <form action="list" method="post">
-<table>
-<tr> <td align="right" valign="top"><b>List name</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>
+<table class="blanks">
+<tr> <td>List name:</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>
index 1390955..9ac74f9 100644 (file)
@@ -9,10 +9,10 @@ if $"cmd" = "add" then
        val name = $"name";
 
        if Location.alreadyExists (parent, name) then
-               %><h3><b>That location already exists!</b></h3><%
+               %><h3>That location already exists!</h3><%
        else
                val id = Location.addLocation (parent, $"name")
-               %><h3><b>Location added</b></h3>
+               %><h3>Location added</h3>
 <%     end
 
 elseif $"mod" <> "" then
@@ -21,12 +21,12 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"mod");
        val loc = Location.lookupLocation id %>
 
-<h3><b>Modify a location</b></h3>
+<h3>Modify a location</h3>
 
 <form action="location" method="post">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Parent</b>:</td> <td><select name="parent">
+<table class="blanks">
+<tr> <td>Parent:</td> <td><select name="parent">
        <option value=""<% if #parent loc = NONE then %> selected<% end %>>&lt;None&gt;</option>
 <% ref indent = 0;
 foreach item in Location.locationTree (NONE, NONE) do
@@ -42,7 +42,7 @@ foreach item in Location.locationTree (NONE, NONE) do
 <%     end
 end %>
 </select></td> </tr>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name loc) %>"></td> </tr>
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name loc) %>"></td> </tr>
 <tr> <td><input type="submit" value="Save"></td> </tr>
 </table>
 </form>
@@ -53,14 +53,14 @@ end %>
        val loc = Location.lookupLocation id;
        Location.modLocation {loc with parent = (case $"parent" of "" => NONE | parent => SOME (Web.stoi parent)),
                name = $"name"};
-       %><h3><b>Location saved</b></h3>        
+       %><h3>Location saved</h3>       
 
 <% elseif $"del" <> "" then
        Group.requireGroupName "location";
        showNormal := false;
        val id = Web.stoi ($"del");
        val loc = Location.lookupLocation id %>
-       <h3><b>Are you sure you want to delete "<% Web.html (#name loc) %>"?</b></h3>
+       <h3>Are you sure you want to delete "<% Web.html (#name loc) %>"?</h3>
        <a href="location?del2=<% id %>">Yes, delete "<% Web.html (#name loc) %>"!</a>
 
 <% elseif $"del2" <> "" then
@@ -68,15 +68,15 @@ end %>
        val id = Web.stoi ($"del2");
        val loc = Location.lookupLocation id;
        Location.deleteLocation id %>
-       <h3><b>Deleted location "<% Web.html (#name loc) %>"</b></h3>
+       <h3>Deleted location "<% Web.html (#name loc) %>"</h3>
 
 <% elseif $"addLoc" <> "" then
        Location.addToLocation {loc = Web.stoi ($"addLoc"), usr = Init.getUserId ()}
-       %><h3><b>Added</b></h3>
+       %><h3>Added</h3>
 
 <% elseif $"remLoc" <> "" then
        Location.removeFromLocation {loc = Web.stoi ($"remLoc"), usr = Init.getUserId ()}
-       %><h3><b>Removed</b></h3>
+       %><h3>Removed</h3>
 
 <% elseif $"id" <> "" then
        showNormal := false;
@@ -91,7 +91,7 @@ end %>
                %><b>Parent</b>: <a href="location?id=<% par %>"><% Web.html (#name ploc) %></a><%
 end %>
 
-<h3><b>Residents:</b></h3>
+<h3>Residents:</h3>
 <% ref first = true;
 foreach user in Location.residents id do
        if first then
@@ -102,7 +102,7 @@ foreach user in Location.residents id do
        %><a href="user?id=<% #id user %>"><% #name user %></a><%
 end %>
 
-<h3><b>Regions:</b></h3>
+<h3>Regions:</h3>
 <% foreach loc in Location.subLocations (SOME id) do %>
        <a href="location?id=<% #id loc %>"><% Web.html (#name loc) %></a><br>
 <% end;
@@ -124,12 +124,12 @@ if showNormal then %>
 end %>
 </ul>
 
-<h3><b>Add a new location</b></h3>
+<h3>Add a new location</h3>
 
 <form action="location" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Parent</b>:</td> <td><select name="parent">
+<table class="blanks">
+<tr> <td>Parent:</td> <td><select name="parent">
        <option value="">&lt;None&gt;</option>
 <% ref indent = 0;
 foreach item in Location.locationTree (NONE, NONE) do
@@ -145,14 +145,14 @@ foreach item in Location.locationTree (NONE, NONE) do
 <%     end
 end %>
 </select></td> </tr>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </tr>
 </table>
 </form>
 
 <% val withUser = Location.locationTreeWithUser (NONE, NONE, Init.getUserId ()) %>
 
-<h3><b>Add yourself to a location</b></h3>
+<h3>Add yourself to a location</h3>
 
 Adding yourself to a location automatically adds you to all more general loations.
 
@@ -175,7 +175,7 @@ end %>
 </select> <input type="submit" value="Add">
 </form>
 
-<h3><b>Remove yourself from a location</b></h3>
+<h3>Remove yourself from a location</h3>
 
 <form action="location" method="post">
 <select name="remLoc">
index c7756f5..2293821 100644 (file)
--- a/money.mlt
+++ b/money.mlt
@@ -16,7 +16,7 @@ if $"hist" <> "" then
        val admin = Group.inGroupName "money";
        showNormal := false %>
 
-<h3><b>Transactions</b></h3>
+<h3>Transactions</h3>
 
 <table>
 <tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Last modified</b></td> <td><b>Participants</b></td> </tr>
@@ -37,7 +37,7 @@ end %>
 <% elseif $"cmd" = "bals" then
        showNormal := false %>
 
-<h3><b>Balances</b></h3>
+<h3>Balances</h3>
 
 <table>
 <% foreach bal in Balance.listOwnedBalances () do %>
@@ -57,17 +57,17 @@ end %></td> </tr>
        Group.requireGroupName "money";
        showNormal := false %>
 
-<h3><b>New hosting bill</b></h3>
+<h3>New hosting bill</h3>
 
 <form action="money" method="post">
 <input type="hidden" name="cmd" value="hosting2">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right"><b>Free bandwidth cutoff (MB)</b>:</td> <td><input name="cutoff" value="200"></td> </tr>
-<tr> <td align="right"><b>Cost/GB</b>:</td> <td><input name="cost" value="4"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member usage</b>:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Free bandwidth cutoff (MB):</td> <td><input name="cutoff" value="200"></td> </tr>
+<tr> <td>Cost/GB:</td> <td><input name="cost" value="4"></td> </tr>
+<tr> <td>Member usage:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </tr>
 </table>
 
@@ -76,7 +76,7 @@ end %></td> </tr>
        val id = Money.addTransaction ($"descr", Util.neg (Web.stor ($"amount")), $"d");
        Money.addHostingCharges {trn = id, cutoff = 1000 * Web.stoi ($"cutoff"), cost = Web.stor ($"cost"), usage = $"usage"};
 
-       %><h3><b>Hosting transaction added.</b></h3>
+       %><h3>Hosting transaction added.</h3>
 
 <% elseif $"modHosting" <> "" then
        Group.requireGroupName "money";
@@ -84,17 +84,17 @@ end %></td> </tr>
        val id = Web.stoi ($"modHosting");
        val trn = Money.lookupTransaction id %>
 
-<h3><b>Modify hosting bill</b></h3>
+<h3>Modify hosting bill</h3>
 
 <form action="money" method="post">
 <input type="hidden" name="saveHosting" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount" value="<% Util.neg (#amount trn) %>"></td> </tr>
-<tr> <td align="right"><b>Free bandwidth cutoff (MB)</b>:</td> <td><input name="cutoff" value="200"></td> </tr>
-<tr> <td align="right"><b>Cost/GB</b>:</td> <td><input name="cost" value="4"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member usage</b>:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"><%
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount" value="<% Util.neg (#amount trn) %>"></td> </tr>
+<tr> <td>Free bandwidth cutoff (MB):</td> <td><input name="cutoff" value="200"></td> </tr>
+<tr> <td>Cost/GB:</td> <td><input name="cost" value="4"></td> </tr>
+<tr> <td>Member usage:</td> <td><textarea wrap="soft" name="usage" rows="24" cols="80"><%
 switch Money.lookupHostingUsage id of
          SOME s => s
 end %></textarea></td> </tr>
@@ -110,19 +110,19 @@ end %></textarea></td> </tr>
        Money.modTransaction {trn with descr = $"descr", d = $"d", amount = Util.neg (Web.stor ($"amount"))};
        Money.addHostingCharges {trn = id, cutoff = 1000 * Web.stoi ($"cutoff"), cost = Web.stor ($"cost"), usage = $"usage"};
 
-       %><h3><b>Hosting transaction modified.</b></h3>
+       %><h3>Hosting transaction modified.</h3>
 
 <% elseif $"cmd" = "evenForm" then
        Group.requireGroupName "money";
        showNormal := false %>
-<h3><b>New generic/even transaction</b></h3>
+<h3>New generic/even transaction</h3>
 <form action="money" method="post">
 <input type="hidden" name="cmd" value="even">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right" valign="top"><b>Members</b>:</td> <td><select name="usrs" size="5" multiple>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Members:</td> <td><select name="usrs" size="5" multiple>
 <% foreach usr in Init.listUsers () do %>
        <option value="<% #id usr %>"><% #name usr %></option>
 <% end %>
@@ -135,15 +135,15 @@ end %></textarea></td> </tr>
        Group.requireGroupName "money";
        showNormal := false %>
 
-<h3><b>New member payment</b></h3>
+<h3>New member payment</h3>
 
 <form action="money" method="post">
 <input type="hidden" name="cmd" value="pay2">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member</b>:</td> <td><select name="usr">
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Member:</td> <td><select name="usr">
 <% foreach usr in Init.listUsers () do %>
        <option value="<% #id usr %>"><% #name usr %></option>
 <% end %>
@@ -159,7 +159,7 @@ end %></textarea></td> </tr>
        Money.addCharge {trn = id, usr = Web.stoi ($"usr"), amount = amount};
        Money.applyCharges id;
 
-       %><h3><b>Payment transaction added.</b></h3>
+       %><h3>Payment transaction added.</h3>
 
 <% elseif $"modPay" <> "" then
        Group.requireGroupName "money";
@@ -167,15 +167,15 @@ end %></textarea></td> </tr>
        val id = Web.stoi ($"modPay");
        val trn = Money.lookupTransaction id %>
 
-<h3><b>Modify member payment</b></h3>
+<h3>Modify member payment</h3>
 
 <form action="money" method="post">
 <input type="hidden" name="savePay" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Member</b>:</td> <td><select name="usr">
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
+<tr> <td>Member:</td> <td><select name="usr">
 <% foreach (sel, usr) in Money.listUsers (#id trn) do %>
        <option value="<% #id usr %>"<% if sel then %> selected<% end %>><% #name usr %></option>
 <% end %>
@@ -194,19 +194,19 @@ end %></textarea></td> </tr>
        Money.addCharge {trn = id, usr = Web.stoi ($"usr"), amount = amount};
        Money.applyCharges id;
 
-       %><h3><b>Member payment modified.</b></h3>
+       %><h3>Member payment modified.</h3>
 
 <% elseif $"cmd" = "evenForm" then
        Group.requireGroupName "money";
        showNormal := false %>
-<h3><b>New generic/even transaction</b></h3>
+<h3>New generic/even transaction</h3>
 <form action="money" method="post">
 <input type="hidden" name="cmd" value="even">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right" valign="top"><b>Members</b>:</td> <td><select name="usrs" size="5" multiple>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Members:</td> <td><select name="usrs" size="5" multiple>
 <% foreach usr in Init.listUsers () do %>
        <option value="<% #id usr %>"><% #name usr %></option>
 <% end %>
@@ -220,21 +220,21 @@ end %></textarea></td> </tr>
        val id = Money.addTransaction ($"descr", Web.stor ($"amount"), $"d");
        Money.addEvenCharges (id, map Web.stoi (Web.getMultiParam "usrs"))
 
-       %><h3><b>Even transaction added.</b></h3>
+       %><h3>Even transaction added.</h3>
 
 <% elseif $"modEven" <> "" then
        Group.requireGroupName "money";
        showNormal := false;
        val trn = Money.lookupTransaction (Web.stoi ($"modEven")) %>
-<h3><b>Modify even transaction</b></h3>
+<h3>Modify even transaction</h3>
 
 <form action="money" method="post">
 <input type="hidden" name="saveEven" value="<% $"modEven" %>">
-<table>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Members</b>:</td> <td><select name="usrs" size="5" multiple>
+<table class="blanks">
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr trn) %>"></td> </tr>
+<tr> <td>Date:</td> <td><input name="d" value="<% Web.html (#d trn) %>"></td> </tr>
+<tr> <td>Amount:</td> <td><input name="amount" value="<% #amount trn %>"></td> </tr>
+<tr> <td>Members:</td> <td><select name="usrs" size="5" multiple>
 <% foreach (sel, usr) in Money.listUsers (#id trn) do %>
        <option value="<% #id usr %>"<% if sel then %> selected<% end %>><% #name usr %></option>
 <% end %>
@@ -251,13 +251,13 @@ end %></textarea></td> </tr>
        Money.modTransaction {trn with descr = $"descr", d = $"d", amount = Web.stor ($"amount")};
        Money.addEvenCharges (id, map Web.stoi (Web.getMultiParam "usrs"))
 
-       %><h3><b>Even transaction modified</b></h3>
+       %><h3>Even transaction modified</h3>
 
 <% elseif $"del" <> "" then
        Group.requireGroupName "money";
        showNormal := false;
        val trn = Money.lookupTransaction (Web.stoi ($"del")) %>
-       <h3><b>Are you sure you want to delete transaction <a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a>?</b></h3>
+       <h3>Are you sure you want to delete transaction <a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a>?</h3>
        <a href="money?del2=<% $"del" %>">Yes, delete <% Web.html (#descr trn) %>!</a>
 
 <% elseif $"del2" <> "" then
@@ -266,24 +266,24 @@ end %></textarea></td> </tr>
        val trn = Money.lookupTransaction id;
        Money.clearCharges id;
        Money.deleteTransaction id %>
-       <h3><b><% Web.html (#descr trn) %> deleted!</b></h3>
+       <h3><% Web.html (#descr trn) %> deleted!</h3>
 
 <% elseif $"cmd" = "equalize" then
        Group.requireGroupName "money";
        Money.equalizeBalances ();
-       %><h3><b>Balances equalized</b></h3>
+       %><h3>Balances equalized</h3>
 
 <% elseif $"trn" <> "" then
        showNormal := false;
        val id = Web.stoi ($"trn");
        val trn = Money.lookupTransaction id %>
-<table>
-<tr> <td align="right"><b>TRN#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><% Web.html (#descr trn) %></td> </tr>
-<tr> <td align="right"><b>Date</b>:</td> <td><% #d trn %></td> </tr>
-<tr> <td align="right"><b>Amount</b>:</td> <td>$<% #amount trn %></td> </tr>
-<tr> <td align="right" valign="top"><b>Distribution</b>:</td>
-
+<table class="blanks">
+<tr> <td>TRN#:</td> <td><% id %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.html (#descr trn) %></td> </tr>
+<tr> <td>Date:</td> <td><% #d trn %></td> </tr>
+<tr> <td>Amount:</td> <td>$<% #amount trn %></td> </tr>
+<tr> <td>Distribution:</td>
+x
 <% ref first = true;
 foreach (name, cha) in Money.listChargesWithNames id do
        if first then
@@ -299,7 +299,7 @@ end %>
 
 <% if showNormal then %>
 
-<h3><b>Your balance:</b> $<% #amount (Balance.lookupBalance (#bal (Init.getUser ()))) %></h3>
+<h3>Your balance:</b> $<% #amount (Balance.lookupBalance (#bal (Init.getUser ()))) %></h3>
 
 <a href="money?cmd=list">List all transactions</a><br>
 <a href="money?cmd=bals">List all balances</a><br>
@@ -313,7 +313,7 @@ end %>
 <br>
 <a href="money?cmd=equalize">Equalize balances</a><br>
 
-<h3><b>Most recent transactions</b></h3>
+<h3>Most recent transactions</h3>
 
 <table>
 <tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Participants</b></td> <td><b>Replace</b></td> <td><b>Delete</b></td> </tr>
@@ -330,7 +330,7 @@ end %>
 
 <% else %>
 
-<h3><b>Your recent account activity</b></h3>
+<h3>Your recent account activity</h3>
 
 <table>
 <tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
index 834f22d..a0305d9 100644 (file)
--- a/poll.mlt
+++ b/poll.mlt
@@ -8,7 +8,7 @@ ref showNormal = true;
 if $"cmd" = "list" then
        showNormal := false %>
 
-<h2><b>All polls</b></h2>
+<h2>All polls</h2>
 
 <% foreach pol in Poll.listPolls () do %>
 <li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
@@ -21,16 +21,16 @@ elseif $"vote" <> "" then
        val id = Web.stoi ($"vote");
        val poll = Poll.lookupPoll id %>
 
-<table>
-<tr> <td align="right"><b>Poll#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
-<tr> <td align="right"><b>Start</b>:</td> <td><% Web.html (#starts poll) %></td> </tr>
-<tr> <td align="right"><b>End</b>:</td> <td><% Web.html (#ends poll) %></td> </tr>
-<tr> <td align="right"><b>Votes/person</b>:</td> <td><% #votes poll %></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
+<table class="blanks">
+<tr> <td>Poll#:</td> <td><% id %></td> </tr>
+<tr> <td>Title:</td> <td><% Web.html (#title poll) %></td> </tr>
+<tr> <td>Start:</td> <td><% Web.html (#starts poll) %></td> </tr>
+<tr> <td>End:</td> <td><% Web.html (#ends poll) %></td> </tr>
+<tr> <td>Votes/person:</td> <td><% #votes poll %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
 </table>
 
-<h3><b>Choices</b></h3>
+<h3>Choices</h3>
 
 <form action="poll" method="post">
 <input type="hidden" name="vote2" value="<% id %>">
@@ -57,12 +57,12 @@ foreach (you, cho) in choices do %>
                | v => map Web.stoi v;
 
        if length votes > #votes poll then
-               %><h3><b>You can't vote for that many different choices!</b></h3><%
+               %><h3>You can't vote for that many different choices!</h3><%
        elseif not (Poll.noDupes votes) then
-               %><h3><b>You can't vote multiple times for the same choice!</b></h3><%
+               %><h3>You can't vote multiple times for the same choice!</h3><%
        else
                Poll.vote (Init.getUserId (), id, votes)
-               %><h3><b>Thanks for voting!</b></h3>
+               %><h3>Thanks for voting!</h3>
 <%     end
 
 elseif $"cmd" = "add" then
@@ -71,17 +71,17 @@ elseif $"cmd" = "add" then
        val ends = $"ends";
        val votes = Web.stoi ($"votes");
        if title = "" then
-               %><h3><b>Your poll must have a title.</b></h3><%
+               %><h3>Your poll must have a title.</h3><%
        elseif not pollAdmin and not (Poll.dateGeNow starts) then
-               %><h3><b>That start date is in the past!</b></h3><%
+               %><h3>That start date is in the past!</h3><%
        elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then
-               %><h3><b>The end date comes before the start date!</b></h3><%
+               %><h3>The end date comes before the start date!</h3><%
        elseif votes <= 0 then
-               %><h3><b>You must specify a positive number of votes per person.</b></h3><%
+               %><h3>You must specify a positive number of votes per person.</h3><%
        else
                val id = Poll.addPoll (Init.getUserId(), title, $"descr", starts, ends, votes);
                editingPoll := SOME id;
-               %><h3><b>Poll added!</b></h3><%
+               %><h3>Poll added!</h3><%
        end
 
 elseif $"mod" <> "" then
@@ -89,16 +89,16 @@ elseif $"mod" <> "" then
        val poll = Poll.lookupPoll (Web.stoi ($"mod"));
 
        Poll.requireCanModify poll %>
-<h3><b>Modify poll</b></h3>
+<h3>Modify poll</h3>
 
 <form action="poll" method="post">
 <input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title poll) %>"></td> </tr>
-<tr> <td align="right"><b>Start date</b>:</td> <td><input name="starts" value="<% Web.html (#starts poll) %>"></td> </tr>
-<tr> <td align="right"><b>End date</b>:</td> <td><input name="ends" value="<% Web.html (#ends poll) %>"></td> </tr>
-<tr> <td align="right"><b>Max votes/person</b>:</td> <td><input name="votes" value="<% #votes poll %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"><% Web.html (#descr poll) %></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title" value="<% Web.html (#title poll) %>"></td> </tr>
+<tr> <td>Start date:</td> <td><input name="starts" value="<% Web.html (#starts poll) %>"></td> </tr>
+<tr> <td>End date:</td> <td><input name="ends" value="<% Web.html (#ends poll) %>"></td> </tr>
+<tr> <td>Max votes/person:</td> <td><input name="votes" value="<% #votes poll %>"></td> </tr>
+<tr> <td>Description:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"><% Web.html (#descr poll) %></textarea></td> </tr>
 <tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
 </table>
 </form>
@@ -113,41 +113,41 @@ elseif $"mod" <> "" then
        val ends = $"ends";
        val votes = Web.stoi ($"votes");
        if title = "" then
-               %><h3><b>Your poll must have a title.</b></h3><%
+               %><h3>Your poll must have a title.</h3><%
        elseif not pollAdmin and not (Poll.dateGeNow starts) then
-               %><h3><b>That start date is in the past!</b></h3><%
+               %><h3>That start date is in the past!</h3><%
        elseif not pollAdmin and not (Poll.dateLe (starts, ends)) then
-               %><h3><b>The end date comes before the start date!</b></h3><%
+               %><h3>The end date comes before the start date!</h3><%
        elseif votes <= 0 then
-               %><h3><b>You must specify a positive number of votes per person.</b></h3><%
+               %><h3>You must specify a positive number of votes per person.</h3><%
        else
                Poll.modPoll {poll with title = title, descr = $"descr", starts = starts, ends = ends, votes = votes};
                editingPoll := SOME (#id poll);
-               %><h3><b>Poll record saved.</b></h3><%
+               %><h3>Poll record saved.</h3><%
        end
 
 elseif $"del" <> "" then
        Group.requireGroupName "poll";
        showNormal := false;
        val poll = Poll.lookupPoll (Web.stoi ($"del")) %>
-       <h3><b>Are you sure you want to delete poll <a href="poll?id=<% #id poll %>"><% Web.html (#title poll) %></a>?</b></h3>
+       <h3>Are you sure you want to delete poll <a href="poll?id=<% #id poll %>"><% Web.html (#title poll) %></a>?</h3>
        <a href="poll?del2=<% $"del" %>">Yes, delete <% Web.html (#title poll) %>!</a>
 
 <% elseif $"del2" <> "" then
        Group.requireGroupName "poll";
        val poll = Poll.lookupPoll (Web.stoi ($"del2"));
        Poll.deletePoll (Web.stoi ($"del2")) %>
-       <h3><b><% Web.html (#title poll) %> deleted!</b></h3>
+       <h3><% Web.html (#title poll) %> deleted!</h3>
 
 <% elseif $"addChoice" <> "" then
        val id = Web.stoi ($"addChoice");
        editingPoll := SOME id;
        val descr = $"descr";
        if descr = "" then
-               %><h3><b>Your poll choice must have a description.</b></h3><%
+               %><h3>Your poll choice must have a description.</h3><%
        else
                val id = Poll.addChoice (id, Web.stor ($"seq"), descr);
-               %><h3><b>Choice added!</b></h3><%
+               %><h3>Choice added!</h3><%
        end
 
 elseif $"modChoice" <> "" then
@@ -159,9 +159,9 @@ elseif $"modChoice" <> "" then
 
 <form action="poll" method="post">
 <input type="hidden" name="saveChoice" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Text</b>:</td> <td><input name="descr" value="<% Web.html (#descr cho) %>"></td> </tr>
-<tr> <td align="right"><b>Sequence#</b>:</td> <td><input name="seq" value="<% #seq cho %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Text:</td> <td><input name="descr" value="<% Web.html (#descr cho) %>"></td> </tr>
+<tr> <td>Sequence#:</td> <td><input name="seq" value="<% #seq cho %>"></td> </tr>
 <tr> <td><input type="submit" value="Save"></td> </tr>
 </table>
 </form>
@@ -174,10 +174,10 @@ elseif $"modChoice" <> "" then
        editingPoll := SOME (#id poll);
        val descr = $"descr";
        if descr = "" then
-               %><h3><b>Your poll choice must have a description.</b></h3><%
+               %><h3>Your poll choice must have a description.</h3><%
        else
                Poll.modChoice {cho with seq = Web.stor ($"seq"), descr = descr};
-               %><h3><b>Choice saved!</b></h3><%
+               %><h3>Choice saved!</h3><%
        end
 
 elseif $"delChoice" <> "" then
@@ -186,7 +186,7 @@ elseif $"delChoice" <> "" then
        val poll = Poll.lookupPoll (#pol cho);
        Poll.requireCanModify poll;
        showNormal := false %>
-       <h3><b>Are you sure you want to delete choice "<% Web.html (#descr cho) %>"</a>?</b></h3>
+       <h3>Are you sure you want to delete choice "<% Web.html (#descr cho) %>"</a>?</h3>
        <a href="poll?delChoice2=<% $"delChoice" %>">Yes, delete "<% Web.html (#descr cho) %>"!</a>
 
 <% elseif $"delChoice2" <> "" then
@@ -196,7 +196,7 @@ elseif $"delChoice" <> "" then
        Poll.requireCanModify poll;
        Poll.deleteChoice id;
        editingPoll := SOME (#id poll) %>
-       <h3><b>"<% Web.html (#descr cho) %>" deleted!</b></h3>
+       <h3>"<% Web.html (#descr cho) %>" deleted!</h3>
 
 <% elseif $"report" <> "" then
        showNormal := false;
@@ -205,7 +205,7 @@ elseif $"delChoice" <> "" then
        val poll = Poll.lookupPoll id;
        val canModify = Poll.canModify poll %>
 
-<h3><b>Vote Report</b></h3>
+<h3>Vote Report</h3>
 
 <p>Voters:
 <%     ref first = true;
@@ -218,13 +218,13 @@ elseif $"delChoice" <> "" then
                %><a href="user?id=<% #id user %>"><% #name user %></a><%
        end %></p>
 
-<table>
-<tr> <td align="right"><b>Poll#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
-<tr> <td align="right"><b>Start</b>:</td> <td><% Web.html (#starts poll) %></td> </tr>
-<tr> <td align="right"><b>End</b>:</td> <td><% Web.html (#ends poll) %></td> </tr>
-<tr> <td align="right"><b>Votes/person</b>:</td> <td><% #votes poll %></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
+<table class="blanks">
+<tr> <td>Poll#</b>:</td> <td><% id %></td> </tr>
+<tr> <td>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
+<tr> <td>Start>:</td> <td><% Web.html (#starts poll) %></td> </tr>
+<tr> <td>End:</td> <td><% Web.html (#ends poll) %></td> </tr>
+<tr> <td>Votes/person:</td> <td><% #votes poll %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
 </table>
 
 <br><hr><br>
@@ -256,17 +256,17 @@ end %>
                val poll = Poll.lookupPoll id;
                val canModify = Poll.canModify poll %>
 
-<table>
+<table class="blanks">
 <% if canModify then %><tr> <td></td> <td><a href="poll?mod=<% id %>">Edit poll data</a></td> </tr><% end %>
-<tr> <td align="right"><b>Poll#</b>:</td> <td><% id %></td> </tr>
-<tr> <td align="right"><b>Title</b>:</td> <td><% Web.html (#title poll) %></td> </tr>
-<tr> <td align="right"><b>Start</b>:</td> <td><% Web.html (#starts poll) %></td> </tr>
-<tr> <td align="right"><b>End</b>:</td> <td><% Web.html (#ends poll) %></td> </tr>
-<tr> <td align="right"><b>Votes/person</b>:</td> <td><% #votes poll %></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
+<tr> <td>Poll#:</td> <td><% id %></td> </tr>
+<tr> <td>Title:</td> <td><% Web.html (#title poll) %></td> </tr>
+<tr> <td>Start:</td> <td><% Web.html (#starts poll) %></td> </tr>
+<tr> <td>End:</td> <td><% Web.html (#ends poll) %></td> </tr>
+<tr> <td>Votes/person:</td> <td><% #votes poll %></td> </tr>
+<tr> <td>Description:</td> <td><% Web.htmlNl (#descr poll) %></td> </tr>
 </table>
 
-<h3><b>Choices<% if Poll.takingVotes poll then %><a href="poll?vote=<% id %>">(Vote!)</a><% end %></b></h3>
+<h3>Choices<% if Poll.takingVotes poll then %><a href="poll?vote=<% id %>">(Vote!)</a><% end %></h3>
 
 <p><% Poll.countVoters (#id poll) %> people have voted.</p>
 
@@ -300,13 +300,13 @@ end %>
 
 <% if canModify then %>
 <br><hr><br>
-<h3><b>Add a new choice</b></h3>
+<h3>Add a new choice</h3>
 
 <form action="poll" method="post">
 <input type="hidden" name="addChoice" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Text</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><b>Sequence#</b>:</td> <td><input name="seq" value="<% Poll.nextSeq id %>"></td> </tr>
+<table class="blanks">
+<tr> <td>Text:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Sequence#:</td> <td><input name="seq" value="<% Poll.nextSeq id %>"></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </tr>
 </table>
 </form>
@@ -317,16 +317,16 @@ if showNormal then %>
 
 <a href="poll?cmd=list">Show all polls</a><br>
 
-<h3><b>Create a poll</b></h3>
+<h3>Create a poll</h3>
 
 <form action="poll" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right"><b>Start date</b>:</td> <td><input name="starts"></td> </tr>
-<tr> <td align="right"><b>End date</b>:</td> <td><input name="ends"></td> </tr>
-<tr> <td align="right"><b>Max votes/person</b>:</td> <td><input name="votes"></td> </tr>
-<tr> <td align="right" valign="top"><b>Description</b>:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td>Start date:</td> <td><input name="starts"></td> </tr>
+<tr> <td>End date:</td> <td><input name="ends"></td> </tr>
+<tr> <td>Max votes/person:</td> <td><input name="votes"></td> </tr>
+<tr> <td>Description:</td> <td><textarea name="descr" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Create"></td> </tr>
 </table>
 </form>
dissimilarity index 67%
index 63c4116..f88c28f 100644 (file)
@@ -1,86 +1,43 @@
-<% val you = Init.getUser();
-val bal = Balance.lookupBalance (#bal you);
-@header [] %>
-
-<% if Group.inGroupNum 0 then %>
-<b><h3>Admin</h3></b>
-<a href="apps?cmd=approved">Approved applicants waiting for accounts</a><br>
-<a href="users">Members</a><br>
-<a href="groups">Groups</a><br>
-<a href="balances">Balances</a><br>
-<a href="kind">Contact kinds</a><br>
-<a href="roll">Roll call!</a><br>
-<% end %>
-
-<b><h3>Your account</h3></b>
-
-<a href="pref">Preferences</a><br>
-<a href="money">Financial</a><br>
-<a href="sec">Security settings</a><br>
-<a href="contact">Contact information</a><br>
-<a href="location">Your geographic locations</a><br>
-<a href="link">Public URL directory</a><br>
-
-<b><h3>Support requests</h3></b>
-
-<a href="domain">Request control of a domain with domtool</a><br>
-<a href="apt">Request Debian apt packages</a><br>
-<a href="list">Request a Mailman mailing list</a><br>
-<a href="support">Other support request</a><br>
-
-<h3><b><a href="money">Your recent account activity</a></b></h3>
-
-<table>
-<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
-<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
-<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> </tr>
-<% end %>
-</table>
-<b>Balance: $<% #amount bal %></b>
-
-<h3><b><a href="poll">Current polls</a></b></h3>
-
-<% foreach pol in Poll.listCurrentPolls () do %>
-<li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
-<% if Poll.takingVotes pol then %><a href="poll?vote=<% #id pol %>">[VOTE]</a><% end %>
-(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)</li>
-<% end %>
-
-<h3><b><a href="support">Open support issues</a></b></h3>
-
-<% foreach (name, issue) in Support.listOpenIssues (#id you) do %>
-<a href="user?id=<% #usr issue %>"><% name %></a>: <a href="issue?cat=<% #cat issue %>&id=<% #id issue %>"><% Web.html (#title issue) %></a>
-<% switch #status issue of
-         Support.NEW => %>(New)<%
-       | Support.PENDING => %>(Pending)<%
-       | Support.CLOSED => %>(Closed)<%
-end %>
-<br>
-<% end %>
-
-<h3><b>Statistics</b></h3>
-
-<a href="webbw">Apache bandwidth</a><br>
-<a href="quotas">Disk usage</a><br>
-
-<h3><b>Public pages</b></h3>
-
-<a href="http://hcoop.net/dyn/members.html">Member directory</a><br>
-<a href="http://hcoop.net/dyn/locs.html">Member location summary</a><br>
-<a href="http://hcoop.net/dyn/sites.html">URL directory</a><br>
-
-<h3><b>Miscellaneous</b></h3>
-
-<a href="apps">Review pending membership applications</a><br>
-<a href="dir">Contact information directory</a><br>
-<a href="poll">Polls</a><br>
-
-<h3><b>Other services</b></h3>
-
-<a href="/webalizer/">Webalizer</a><br>
-<a href="/mrtg/">MRTG statistics</a><br>
-<a href="http://nms.interserver.net/cac/nms.php?server_name=bmV3Lmhjb29wLm5ldA==">InterServer bandwidth statistics</a><br>
-<a href="/usermin/">Usermin</a><br>
-<a href="/squirrel/">SquirrelMail</a><br>
-
-<% @footer [] %>
\ No newline at end of file
+<% val you = Init.getUser();
+val bal = Balance.lookupBalance (#bal you);
+@header [] %>
+
+<h3><a href="money">Your recent account activity</a></h3>
+
+<table>
+<tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
+<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
+<tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> </tr>
+<% end %>
+</table>
+<b>Balance: $<% #amount bal %></b>
+
+<% val polls = Poll.listCurrentPolls ();
+switch polls of
+       _::_ => %>
+<h3><a href="poll">Current polls</a></h3>
+
+<% foreach pol in polls do %>
+<li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
+<% if Poll.takingVotes pol then %><a href="poll?vote=<% #id pol %>">[VOTE]</a><% end %>
+(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)</li>
+<% end
+end %>
+
+<% val issues = Support.listOpenIssues (#id you);
+switch issues of
+       _::_ => %>
+<h3><a href="support">Open support issues</a></h3>
+
+<% foreach (name, issue) in issues do %>
+<a href="user?id=<% #usr issue %>"><% name %></a>: <a href="issue?cat=<% #cat issue %>&id=<% #id issue %>"><% Web.html (#title issue) %></a>
+<% switch #status issue of
+         Support.NEW => %>(New)<%
+       | Support.PENDING => %>(Pending)<%
+       | Support.CLOSED => %>(Closed)<%
+end %>
+<br>
+<% end
+end %>
+
+<% @footer [] %>
\ No newline at end of file
index ebba9ab..6c973cf 100644 (file)
--- a/pref.mlt
+++ b/pref.mlt
@@ -15,25 +15,25 @@ if $"cmd" = "mod" then
                        Pref.subscribe ("hcoop-discuss", youremail)
                    else
                        Pref.unsubscribe ("hcoop-discuss", youremail)) then
-               %><h3><b>Error setting <tt>hcoop-discuss</tt> status</b></h3><%
+               %><h3>Error setting <tt>hcoop-discuss</tt> status</h3><%
        end;
 
        if not (iff $"misc" = "on" then
                        Pref.subscribe ("hcoop-misc", youremail)
                    else
                        Pref.unsubscribe ("hcoop-misc", youremail)) then
-               %><h3><b>Error setting <tt>hcoop-misc</tt> status</b></h3><%
+               %><h3>Error setting <tt>hcoop-misc</tt> status</h3><%
        end;
 
-       %><h3><b>Preferences updated</b></h3><%
+       %><h3>Preferences updated</h3><%
 end %>
 
 <form action="pref" method="post">
 <input type="hidden" name="cmd" value="mod">
-<table>
-<tr> <td align="right"><input type="checkbox" name="dir"<% if Pref.hasDirectory you then %> checked<% end %>></td> <td>Include me in the public member directory.</td> </tr>
-<tr> <td align="right"><input type="checkbox" name="discuss"<% if Pref.subscribed ("hcoop-discuss", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-discuss</tt> mailing list. <i>(On-topic discussion and sporadically high volume)</i></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="misc"<% if Pref.subscribed ("hcoop-misc", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-misc</tt> mailing list. <i>(Off-topic)</i></td> </tr>
+<table class="blanks">
+<tr> <td><input type="checkbox" name="dir"<% if Pref.hasDirectory you then %> checked<% end %>></td> <td>Include me in the public member directory.</td> </tr>
+<tr> <td><input type="checkbox" name="discuss"<% if Pref.subscribed ("hcoop-discuss", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-discuss</tt> mailing list. <i>(On-topic discussion and sporadically high volume)</i></td> </tr>
+<tr> <td><input type="checkbox" name="misc"<% if Pref.subscribed ("hcoop-misc", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-misc</tt> mailing list. <i>(Off-topic)</i></td> </tr>
 <tr> <td><input type="submit" value="Save"></td> </tr>
 </table>
 
index 16db145..2d396aa 100644 (file)
--- a/roll.mlt
+++ b/roll.mlt
@@ -14,33 +14,33 @@ if $"cmd" = "respond" then
 
        if code = #code rc then
                Roll.respond (rol, you);
-               %><h3><b>Your response has been saved.  Thank you!</b></h3><%
+               %><h3>Your response has been saved.  Thank you!</h3><%
        else
-               %><h3><b>Incorrect code!</b></h3><%
+               %><h3>Incorrect code!</h3><%
        end
 elseif $"cmd" = "add" then
        Group.requireGroupNum 0;
        val title = $"title";
        val msg = $"msg";
        if title = "" then
-               %><h3><b>Your roll call must have a title.</b></h3><%
+               %><h3>Your roll call must have a title.</h3><%
        else
                val id = Roll.addRollCall (title, msg);
                viewingCall := SOME id;
-               %><h3><b>Roll call added!</b></h3><%
+               %><h3>Roll call added!</h3><%
        end
 
 elseif $"mod" <> "" then
        Group.requireGroupNum 0;
        showNormal := false;
        val rc = Roll.lookupRollCall (Web.stoi ($"mod")) %>
-<h3><b>Modify roll call</b></h3>
+<h3>Modify roll call</h3>
 
 <form action="roll" method="post">
 <input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title" value="<% Web.html (#title rc) %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"><% Web.html (#msg rc) %></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title" value="<% Web.html (#title rc) %>"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"><% Web.html (#msg rc) %></textarea></td> </tr>
 <tr> <td><input type="submit" name="cmd" value="Save"></td> </tr>
 </table>
 </form>
@@ -52,25 +52,25 @@ elseif $"mod" <> "" then
        val title = $"title";
        val msg = $"msg";
        if title = "" then
-               %><h3><b>Your rol call must have a title.</b></h3><%
+               %><h3>Your rol call must have a title.</h3><%
        else
                Roll.modRollCall {rc with title = title, msg = msg};
                viewingCall := SOME (#id rc);
-               %><h3><b>Roll call saved.</b></h3><%
+               %><h3>Roll call saved.</h3><%
        end
 
 elseif $"del" <> "" then
        Group.requireGroupNum 0;
        showNormal := false;
        val rc = Roll.lookupRollCall (Web.stoi ($"del")) %>
-       <h3><b>Are you sure you want to delete roll call "<a href="roll?view=<% #id rc %>"><% Web.html (#title rc) %></a>"?</b></h3>
+       <h3>Are you sure you want to delete roll call "<a href="roll?view=<% #id rc %>"><% Web.html (#title rc) %></a>"?</h3>
        <a href="roll?del2=<% $"del" %>">Yes, delete <% Web.html (#title rc) %>!</a>
 
 <% elseif $"del2" <> "" then
        Group.requireGroupNum 0;
        val rc = Roll.lookupRollCall (Web.stoi ($"del2"));
        Roll.deleteRollCall (Web.stoi ($"del2")) %>
-       <h3><b><% Web.html (#title rc) %> deleted!</b></h3>
+       <h3><% Web.html (#title rc) %> deleted!</h3>
 
 <% elseif $"cmd" = "mailall" then
        Group.requireGroupNum 0;
@@ -97,19 +97,19 @@ if showNormal then
 
        switch viewingCall of
                  NONE => %>
-<h3><b>Existing roll calls</b></h3>
+<h3>Existing roll calls</h3>
 
 <% foreach rc in Roll.listRollCalls () do %>
 <li> <a href="roll?view=<% #id rc %>"><% Web.html (#title rc) %></a> (<% #started rc %>)</li>
 <% end %>
 
-<h3><b>New roll call</b></h3>
+<h3>New roll call</h3>
 
 <form action="roll" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Title</b>:</td> <td><input name="title"></td> </tr>
-<tr> <td align="right" valign="top"><b>Message</b>:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Title:</td> <td><input name="title"></td> </tr>
+<tr> <td>Message:</td> <td><textarea name="msg" wrap="soft" rows="5" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Create"></td> </tr>
 </table>
 </form>
@@ -118,21 +118,21 @@ if showNormal then
 
 <%             | SOME id =>
        val rc = Roll.lookupRollCall id %>
-       <h3><b>Roll call "<% Web.html (#title rc) %>"</b></h3>
-       <table border="0">
-       <tr> <td align="right"><b>Started:</b></td> <td><% #started rc %></td> </tr>
-       <tr> <td align="right" valign="top"><b>Message:</b></td> <td><% Web.htmlNl (#msg rc) %></td> </tr>
+       <h3>Roll call "<% Web.html (#title rc) %>"</h3>
+       <table border="0" class="blanks">
+       <tr> <td>Started:</td> <td><% #started rc %></td> </tr>
+       <tr> <td>Message:</td> <td><% Web.htmlNl (#msg rc) %></td> </tr>
        </table>
        [ <a href="roll?mod=<% id %>">Modify</a> | <a href="roll?del=<% id %>">Delete</a> ]<br>
 
 <% val (didnt, did) = Roll.listEntries id %>
 
-<h2><b>Didn't respond yet:</b></h2>
+<h2>Didn't respond yet:</h2>
 <% foreach (usr, ent) in didnt do %>
 <li> <a href="user?id=<% #id usr %>"><% Web.html (#name usr) %></a></li>
 <% end %>
 
-<h2><b>Responded:</b></h2>
+<h2>Responded:</h2>
 <% foreach (usr, ent) in did do %>
 <li> <a href="user?id=<% #id usr %>"><% Web.html (#name usr) %></a> (<%
        switch #responded ent of SOME st => st end %>)</li>
diff --git a/sec.mlt b/sec.mlt
index 9e5c0dd..386da98 100644 (file)
--- a/sec.mlt
+++ b/sec.mlt
@@ -22,9 +22,9 @@ if $"cmd" = "socks" then
 elseif $"cmd" = "socks2" then
        val id = Sec.Req.add (you, String.concat [uname, ": change socket permissions to ", $"socks"], $"msg");
        if not (Sec.Req.notifyNew id) then
-               %><h3><b>Error sending e-mail notification</b></h3><%
+               %><h3>Error sending e-mail notification</h3><%
        end
-       %><h3><b>Request added</b></h3><%
+       %><h3>Request added</h3><%
 
 elseif $"cmd" = "tpe" then
        showNormal := false;
@@ -34,9 +34,9 @@ elseif $"cmd" = "tpe" then
 elseif $"cmd" = "tpe2" then
        val id = Sec.Req.add (you, String.concat [uname, ": turn tpe ", $"tpe"], $"msg");
        if not (Sec.Req.notifyNew id) then
-               %><h3><b>Error sending e-mail notification</b></h3><%
+               %><h3>Error sending e-mail notification</h3><%
        end
-       %><h3><b>Request added</b></h3><%
+       %><h3>Request added</h3><%
 
 elseif $"cmd" = "cron" then
        showNormal := false;
@@ -47,9 +47,9 @@ elseif $"cmd" = "cron2" then
        val cron = iff $"cron" = "enabled" then "enable" else "disable";
        val id = Sec.Req.add (you, String.concat [uname, ": ", cron, " cron access"], $"msg");
        if not (Sec.Req.notifyNew id) then
-               %><h3><b>Error sending e-mail notification</b></h3><%
+               %><h3>Error sending e-mail notification</h3><%
        end
-       %><h3><b>Request added</b></h3><%
+       %><h3>Request added</h3><%
 
 elseif $"cmd" = "ftp" then
        showNormal := false;
@@ -60,9 +60,9 @@ elseif $"cmd" = "ftp2" then
        val ftp = iff $"ftp" = "enabled" then "enable" else "disable";
        val id = Sec.Req.add (you, String.concat [uname, ": ", ftp, " FTP access"], $"msg");
        if not (Sec.Req.notifyNew id) then
-               %><h3><b>Error sending e-mail notification</b></h3><%
+               %><h3>Error sending e-mail notification</h3><%
        end
-       %><h3><b>Request added</b></h3><%
+       %><h3>Request added</h3><%
 
 elseif $"cmd" = "rule" then
        showNormal := false;
@@ -72,9 +72,9 @@ elseif $"cmd" = "rule" then
 elseif $"cmd" = "rule2" then
        val id = Sec.Req.add (you, String.concat ["Add firewall rule \"", uname, " ", $"rule", "\""], $"msg");
        if not (Sec.Req.notifyNew id) then
-               %><h3><b>Error sending e-mail notification</b></h3><%
+               %><h3>Error sending e-mail notification</h3><%
        end
-       %><h3><b>Request added</b></h3><%
+       %><h3>Request added</h3><%
 
 elseif $"modRule" <> "" then
        showNormal := false;
@@ -89,9 +89,9 @@ elseif $"modRule" <> "" then
 elseif $"modRule2" <> "" then
        val id = Sec.Req.add (you, String.concat ["Change firewall rule \"", uname, " ", $"modRule2", "\" to \"", uname, " ", $"rule", "\""], $"msg");
        if not (Sec.Req.notifyNew id) then
-               %><h3><b>Error sending e-mail notification</b></h3><%
+               %><h3>Error sending e-mail notification</h3><%
        end
-       %><h3><b>Request added</b></h3><%
+       %><h3>Request added</h3><%
 
 elseif $"delRule" <> "" then
        showNormal := false;
@@ -101,23 +101,23 @@ elseif $"delRule" <> "" then
 elseif $"delRule2" <> "" then
        val id = Sec.Req.add (you, String.concat ["Delete firewall rule \"", uname, " ", $"delRule2", "\""], $"msg");
        if not (Sec.Req.notifyNew id) then
-               %><h3><b>Error sending e-mail notification</b></h3><%
+               %><h3>Error sending e-mail notification</h3><%
        end
-       %><h3><b>Request added</b></h3><%
+       %><h3>Request added</h3><%
 
 elseif $"cmd" = "open" then
        showNormal := false;
        Group.requireGroupName "server";
-       %><h3><b>Open requests</b></h3>
+       %><h3>Open requests</h3>
        <a href="sec?cmd=list">List all requests</a><%
 
        foreach (name, req) in Sec.Req.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>Request</b>:</td> <td><% #data req %></td> </tr>
-<tr> <td align="right" valign="top"><b>Msg</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>Request:</td> <td><% #data req %></td> </tr>
+<tr> <td>Msg:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <br>
@@ -129,15 +129,15 @@ elseif $"cmd" = "open" then
 elseif $"cmd" = "list" then
        showNormal := false;
        Group.requireGroupName "server"
-       %><h3><b>All requests</b></h3><%
+       %><h3>All requests</h3><%
 
        foreach (name, req) in Sec.Req.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>Request</b>:</td> <td><% #data req %></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>Request:</td> <td><% #data req %></td> </tr>
+<tr> <td>Reason:</td> <td colspan="2"><% Web.html (#msg req) %></td> </tr>
 </table>
 
 <br>
@@ -152,20 +152,20 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"mod");
        val req = Sec.Req.lookup id;
        val user = Init.lookupUser (#usr req) %>
-<h3><b>Handle request</b></h3>
+<h3>Handle request</h3>
 
 <form action="sec" method="post">
 <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:</td> <td><select name="status">
        <option value="0"<% if #status req = Sec.Req.NEW then %> selected<% end %>>New</option>
        <option value="1"<% if #status req = Sec.Req.INSTALLED then %> selected<% end %>>Installed</option>
        <option value="2"<% if #status req = Sec.Req.REJECTED then %> selected<% end %>>Rejected</option>
 </select></td> </tr>
-<tr> <td align="right"><b>Request</b>:</td> <td><input name="req" 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>Request:</td> <td><input name="req" 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>
@@ -180,10 +180,10 @@ elseif $"mod" <> "" then
        Sec.Req.modify {req with data = $"req", msg = $"msg", status = newStatus};
        if oldStatus <> newStatus then
                if not (Sec.Req.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
-       %><h3><b>Request modified</b></h3>
+       %><h3>Request modified</h3>
        Back to: <a href="sec?cmd=open">open requests</a>, <a href="sec?cmd=list">all requests</a>
 
 <% elseif $"del" <> "" then
@@ -192,7 +192,7 @@ elseif $"mod" <> "" then
        val id = Web.stoi ($"del");
        val req = Sec.Req.lookup id;
        val user = Init.lookupUser (#usr req)
-       %><h3><b>Are you sure you want to delete request by <% #name user %> for "<% #data req %>"?</b></h3>
+       %><h3>Are you sure you want to delete request by <% #name user %> for "<% #data req %>"?</h3>
        <a href="sec?del2=<% id %>">Yes, I'm sure!</a>
 
 <% elseif $"del2" <> "" then
@@ -200,7 +200,7 @@ elseif $"mod" <> "" then
        Group.requireGroupName "server";
        val id = Web.stoi ($"del2");
        Sec.Req.delete id
-       %><h3><b>Request deleted</b><h3>
+       %><h3>Request deleted</b><h3>
        Back to: <a href="sec?cmd=open">open requests</a>, <a href="sec?cmd=list">all requests</a>
 
 <% end;
@@ -213,64 +213,64 @@ if showNormal then %>
        <option value="<% name %>"<% if uname = name then %> selected<% end %>><% name %></option>
 <% end %></select> <input type="submit" value="Switch"> </form>
 
-<h3><b>Request socket permissions change</b></h3>
+<h3>Request socket permissions change</h3>
 
 <form action="sec" method="post">
 <input type="hidden" name="uname" value="<% uname %>">
 <input type="hidden" name="cmd" value="socks">
-<table>
-<tr> <td align="right"><b>New permissions:</b></td> <td><select name="socks">
+<table class="blanks">
+<tr> <td>New permissions:</td> <td><select name="socks">
        <option value="none"<% if socks = Sec.NADA then %> selected<% end %>>None</option>
        <option value="any"<% if socks = Sec.ANY then %> selected<% end %>>Any</option>
        <option value="client"<% if socks = Sec.CLIENT_ONLY then %> selected<% end %>>Client only</option>
        <option value="server"<% if socks = Sec.SERVER_ONLY then %> selected<% end %>>Server only</option>
 </select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Request"></td> </tr>
 </table>
 </form>
 
-<h3><b>Request change to your execute permissions</b></h3>
+<h3>Request change to your execute permissions</h3>
 
 <form action="sec" method="post">
 <input type="hidden" name="uname" value="<% uname %>">
 <input type="hidden" name="cmd" value="tpe">
-<table>
-<tr> <td align="right"><b>Trusted path executables only?</b></td> <td><select name="tpe">
+<table class="blanks">
+<tr> <td>Trusted path executables only?</td> <td><select name="tpe">
        <option value="no"<% if not tpe then %> selected<% end %>>No</option>
        <option value="yes"<% if tpe then %> selected<% end %>>Yes</option>
 </select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Request"></td> </tr>
 </table>
 </form>
 
-<h3><b>Request change to your <tt>cron</tt> permissions</b></h3>
+<h3>Request change to your <tt>cron</tt> permissions</h3>
 
 <form action="sec" method="post">
 <input type="hidden" name="uname" value="<% uname %>">
 <input type="hidden" name="cmd" value="cron">
-<table>
-<tr> <td align="right"><b>Allowed to use cron?</b></td> <td><select name="cron">
-       <option value="no"<% if not cron then %> selected<% end %>>No</option>
+<table class="blanks">
+<tr> <td>Allowed to use cron?</td> <td><select name="cron">
+       option value="no"<% if not cron then %> selected<% end %>>No</option>
        <option value="yes"<% if cron then %> selected<% end %>>Yes</option>
 </select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Request"></td> </tr>
 </table>
 </form>
 
-<h3><b>Request change to your FTP permissions</b></h3>
+<h3>Request change to your FTP permissions</h3>
 
 <form action="sec" method="post">
 <input type="hidden" name="uname" value="<% uname %>">
 <input type="hidden" name="cmd" value="ftp">
-<table>
-<tr> <td align="right"><b>Allowed to use FTP?</b></td> <td><select name="ftp">
+<table class="blanks">
+<tr> <td>Allowed to use FTP?</td> <td><select name="ftp">
        <option value="no"<% if not ftp then %> selected<% end %>>No</option>
        <option value="yes"<% if ftp then %> selected<% end %>>Yes</option>
 </select></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Request"></td> </tr>
 </table>
 </form>
@@ -278,7 +278,7 @@ if showNormal then %>
 <% val rules = Sec.findFirewallRules uname;
 switch rules of
   _::_ => %>
-<h3><b>Your firewall rules</b></h3>
+<h3>Your firewall rules</h3>
 
 <% foreach rule in rules do %>
 <form action="sec" method="post">
@@ -291,16 +291,16 @@ switch rules of
 <% end
 end%>
 
-<h3><b>Request a new firewall rule</b></h3>
+<h3>Request a new firewall rule</h3>
 
 <p>You can find a description of rule formats <a href="http://wiki.hcoop.net/wiki/FirewallRules">on our wiki</a>. Enter here the rule you want, without the initial <tt>user</tt> portion.</p>
 
 <form action="sec" method="post">
 <input type="hidden" name="uname" value="<% uname %>">
 <input type="hidden" name="cmd" value="rule">
-<table>
-<tr> <td align="right"><b>Rule</b></td> <td><input name="rule" size="80"></td> </tr>
-<tr> <td align="right" valign="top"><b>Reason:</b></td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
+<table class="blanks">
+<tr> <td>Rule</td> <td><input name="rule" size="80"></td> </tr>
+<tr> <td>Reason:</td> <td><textarea name="msg" wrap="soft" rows="3" cols="80"></textarea></td> </tr>
 <tr> <td><input type="submit" value="Request"></td> </tr>
 </table>
 </form>
index 326212f..2d595c4 100644 (file)
@@ -16,15 +16,25 @@ fun generate () =
     let
        val db = C.conn "dbname='hcoop_hcoop'"
 
+       fun procOutput (outf, cmdline) =
+           let
+               val proc = Unix.execute cmdline
+               val ins = Unix.textInstreamOf proc
+                          
+               fun loop () =
+                   case TextIO.inputLine ins of
+                       NONE => ()
+                     | SOME s => (TextIO.output (outf, s); loop ())
+           in
+               loop ();
+               ignore (Unix.reap proc)
+           end
+
        fun header (outf, title) =
-           (TextIO.output (outf, "<html><head>\n<title>");
-            TextIO.output (outf, title);
-            TextIO.output (outf, "</title></head>\n<body>\n<h2><b>");
-            TextIO.output (outf, title);
-            TextIO.output (outf, "</b></h2>\n"))
+           procOutput (outf, ("/usr/local/bin/hcoop_header", [title]))
 
        fun footer outf =
-           TextIO.output (outf, "\n</body></html>")
+           procOutput (outf, ("/usr/local/bin/hcoop_footer", []))
 
        fun genMemberList () =
            let
@@ -50,7 +60,7 @@ fun generate () =
                    end
                  | printOne _ = raise Fail "Bad printOne line"
 
-               val _ = header (outf, "Member list")
+               val _ = header (outf, "HCoop Member List")
                val _ = TextIO.output (outf, "<table>\n")
                val (total, anon) = C.fold db printOne (0, 0)
                                           "SELECT name, rname, usr FROM WebUserPaying LEFT OUTER JOIN DirectoryPref ON id = usr ORDER BY name"
@@ -80,7 +90,7 @@ fun generate () =
                            let
                                val outf = TextIO.openOut (String.concat [outputDir, "member/", name, ".html"])
 
-                               val _ = header (outf, "Hcoop member: " ^ name)
+                               val _ = header (outf, "HCoop member: " ^ name)
                                val _ = TextIO.output (outf, "<table>\n<tr> <td align=\"right\"><b>Member</b>:</td> <td>")
                                val _ = TextIO.output (outf, name)
                                val _ = TextIO.output (outf, "</td> </tr>\n<tr> <td align=\"right\"><b>Name</b>:</td> <td>")
@@ -197,7 +207,7 @@ fun generate () =
            let
                val outf = TextIO.openOut (outputDir ^ "locs.html")
 
-               val _ = header (outf, "Where members live")
+               val _ = header (outf, "HCoop: Where members live")
 
                fun countResidents () =
                    let
@@ -266,7 +276,7 @@ fun generate () =
            let
                val outf = TextIO.openOut (outputDir ^ "sites.html")
 
-               val _ = header (outf, "Hosted sites")
+               val _ = header (outf, "HCoop: Hosted sites")
 
                fun doLink [url, title, descr, name] = (C.stringFromSql url, C.stringFromSql title, C.stringFromSql descr, C.stringFromSql name)
                  | doLink _ = raise Fail "Bad link' row"
index a9c64c9..79ad977 100644 (file)
@@ -7,16 +7,16 @@ ref showNormal = true;
 
 if $"sub" <> "" then
        Support.subscribe { cat = Web.stoi ($"sub"), usr = you }
-       %><h3><b>Subscribed</b></h3>
+       %><h3>Subscribed</h3>
 
 <% elseif $"unsub" <> "" then
        Support.unsubscribe { cat = Web.stoi ($"unsub"), usr = you }
-       %><h3><b>Unsubscribed</b></h3>
+       %><h3>Unsubscribed</h3>
 
 <% elseif $"cmd" = "add" then
        Group.requireGroupName "support";
        val id = Support.addCategory (Web.stoi ($"grp"), $"name", $"descr")
-       %><h3><b>Category added</b></h3>
+       %><h3>Category added</h3>
 
 <% elseif $"mod" <> "" then
        Group.requireGroupName "support";
@@ -24,18 +24,18 @@ if $"sub" <> "" then
        val id = Web.stoi ($"mod");
        val cat = Support.lookupCategory id %>
 
-<h3><b>Modify category</b></h3>
+<h3>Modify category</h3>
 
 <form action="support" method="post">
 <input type="hidden" name="save" value="<% id %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% Web.html (#name cat) %>"></td> </tr>
-<tr> <td align="right"><b>Owning group</b>:</td> <td><select name="grp">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% Web.html (#name cat) %>"></td> </tr>
+<tr> <td>Owning group:</td> <td><select name="grp">
 <% foreach group in Group.listGroups () do %>
        <option value="<% #id group %>"<% if #id group = #grp cat then %> selected<% end %>><% #name group %></option>
 <% end %>
 </select></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr" value="<% Web.html (#descr cat) %>"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr" value="<% Web.html (#descr cat) %>"></td> </tr>
 <tr> <td><input type="submit" value="Save"></td> </tr>
 </table>
 </form>
@@ -45,14 +45,14 @@ if $"sub" <> "" then
        val id = Web.stoi ($"save");
        val cat = Support.lookupCategory id;
        Support.modCategory {cat with name = $"name", descr = $"descr", grp = Web.stoi ($"grp")}
-       %><h3><b>Category saved</b></h3>
+       %><h3>Category saved</h3>
 
 <% elseif $"del" <> "" then
        Group.requireGroupName "support";
        showNormal := false;
        val id = Web.stoi ($"del");
        val cat = Support.lookupCategory id;
-       %><h3><b>Are you sure you want to delete category "<% Web.html (#name cat) %>"?</b></h3>
+       %><h3>Are you sure you want to delete category "<% Web.html (#name cat) %>"?</h3>
        <a href="support?del2=<% id %>">Yes, delete "<% Web.html (#name cat) %>"!</a>
 
 <% elseif $"del2" <> "" then
@@ -60,13 +60,13 @@ if $"sub" <> "" then
        val id = Web.stoi ($"del2");
        val cat = Support.lookupCategory id;
        Support.deleteCategory id;
-       %><h3><b>"<% Web.html (#name cat) %>" deleted</b></h3>
+       %><h3>"<% Web.html (#name cat) %>" deleted</h3>
 
 <% end;
 
 if showNormal then %>
 
-<h3><b>Choose a category:</b></h3>
+<h3>Choose a category:</h3>
 
 <% foreach (sub, cat) in Support.listCategoriesWithSubscriptions you do %>
 <a href="issue?cat=<% #id cat %>"><% Web.html (#name cat) %></a>: <% Web.html (#descr cat) %>
@@ -84,18 +84,18 @@ if showNormal then %>
 
 <% if admin then %>
 
-<h3><b>Add new category</b></h3>
+<h3>Add new category</h3>
 
 <form action="support" method="post">
 <input type="hidden" name="cmd" value="add">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
-<tr> <td align="right"><b>Owning group</b>:</td> <td><select name="grp">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
+<tr> <td>Owning group:</td> <td><select name="grp">
 <% foreach group in Group.listGroups () do %>
        <option value="<% #id group %>"><% #name group %></option>
 <% end %>
 </select></td> </tr>
-<tr> <td align="right"><b>Description</b>:</td> <td><input name="descr"></td> </tr>
+<tr> <td>Description:</td> <td><input name="descr"></td> </tr>
 <tr> <td><input type="submit" value="Add"></td> </tr>
 </table>
 </form>
index 94b3ce9..bf9e1c6 100644 (file)
--- a/user.mlt
+++ b/user.mlt
@@ -3,12 +3,12 @@ val user = Init.lookupUser id;
 
 @header[("title", [#name user])] %>
 
-<table>
-<tr> <td align="right"><b>Member</b>:</td> <td><% #name user %></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname user) %></td> </tr>
-<tr> <td align="right"><b>Hcoop e-mail</b>:</td> <td><a href="mailto:<% #name user %><% Init.emailSuffix %>"><tt><% #name user %><% Init.emailSuffix %></tt></a></td> </tr>
-<tr> <td align="right"><b>Joined</b>:</td> <td><% #joined user %></td> </tr>
-<tr> <td align="right"><b>Locations</b>:</td> <td><%
+<table class="blanks">
+<tr> <td>Member:</td> <td><% #name user %></td> </tr>
+<tr> <td>Real name:</td> <td><% Web.html (#rname user) %></td> </tr>
+<tr> <td>Hcoop e-mail:</td> <td><a href="mailto:<% #name user %><% Init.emailSuffix %>"><tt><% #name user %><% Init.emailSuffix %></tt></a></td> </tr>
+<tr> <td>Joined:</td> <td><% #joined user %></td> </tr>
+<tr> <td>Locations:</td> <td><%
        ref first = true;
        foreach loc in Location.userLocations id do
                if first then
index fbd60aa..cd7582b 100644 (file)
--- a/users.mlt
+++ b/users.mlt
@@ -6,10 +6,10 @@ ref showNormal = true;
 
 if $"cmd" = "Create" then
        if not (Init.validUsername ($"name")) then %>
-               <h3><b>Invalid username</b></h3>
+               <h3>Invalid username</h3>
        <% else switch Init.userNameToId ($"name") of
                  SOME _ => %>
-                       <h3><b>Username already in use</b></h3>
+                       <h3>Username already in use</h3>
 <%             | NONE =>
                        val ap = Web.stoi ($"app");
                        val bal =
@@ -29,23 +29,23 @@ if $"cmd" = "Create" then
 
                        if $"subscribe" = "on" then
                                if not (Pref.subscribe ("hcoop-announce", $"name" ^ Init.emailSuffix)) then
-                                       %><h3><b>Error subscribing to hcoop-announce</b></h3><%
+                                       %><h3>Error subscribing to hcoop-announce</h3><%
                                end
                        end %>
-                       <h3><b>Member added</b></h3>
+                       <h3>Member added</h3>
 <%             end
        end
 elseif $"mod" <> "" then
        showNormal := false;
        val user = Init.lookupUser (Web.stoi ($"mod")) %>
-<h3><b>Modify member record</b></h3>
+<h3>Modify member record</h3>
 
 <form action="users" method="post">
 <input type="hidden" name="id" value="<% $"mod" %>">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name" value="<% #name user %>"></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><input name="rname" value="<% #rname user %>"></td> </tr>
-<tr> <td align="right" valign="top"><b>Funded by</b>:</td> <td><select name="bal">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name" value="<% #name user %>"></td> </tr>
+<tr> <td>Real name:</td> <td><input name="rname" value="<% #rname user %>"></td> </tr>
+<tr> <td>Funded by:</td> <td><select name="bal">
 <% foreach bal in Balance.listBalances () do %>
        <option value="<% #id bal %>"<% if #bal user = #id bal then %> selected <% end %>><% Web.html (#name bal) %></option>
 <% end %>
@@ -57,42 +57,42 @@ elseif $"mod" <> "" then
 <% elseif $"cmd" = "Save" then
        val user = Init.lookupUser (Web.stoi ($"id"));
        Init.modUser {user with name = $"name", bal = Web.stoi ($"bal")} %>
-       <h3><b>Member record saved.</b></h3>
+       <h3>Member record saved.</h3>
 
 <% elseif $"del" <> "" then
        showNormal := false;
        val user = Init.lookupUser (Web.stoi ($"del")) %>
-       <h3><b>Are you sure you want to delete member <a href="user?id=<% #id user %>"><% #name user %></a>?</b></h3>
+       <h3>Are you sure you want to delete member <a href="user?id=<% #id user %>"><% #name user %></a>?</h3>
        <a href="users?del2=<% $"del" %>">Yes, delete <% #name user %>!</a>
 
 <% elseif $"del2" <> "" then
        val user = Init.lookupUser (Web.stoi ($"del2"));
        Init.deleteUser (Web.stoi ($"del2")) %>
-       <h3><b><% #name user %> deleted!</b></h3>
+       <h3><% #name user %> deleted!</h3>
 
 <% elseif $"cmd" = "grandfather" then
        Init.grandfatherUsers()
-       %><h3><b>Grandfathered</b></h3>
+       %><h3>Grandfathered</h3>
 
 <% end %>
 
 <% if showNormal then %>
-<h3><b>New member</b></h3>
+<h3>New member</h3>
 
 <form action="users" method="post">
-<table>
-<tr> <td align="right"><b>Name</b>:</td> <td><input name="name"></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><input name="rname"></td> </tr>
-<tr> <td align="right" valign="top"><b>Funded by</b>:</td> <td><select name="bal">
+<table class="blanks">
+<tr> <td>Name:</td> <td><input name="name"></td> </tr>
+<tr> <td>Real name:</td> <td><input name="rname"></td> </tr>
+<tr> <td>Funded by:</td> <td><select name="bal">
        <option value="">A new balance</option>
 <% foreach bal in Balance.listBalances () do %>
        <option value="<% #id bal %>"><% Web.html (#name bal) %></option>
 <% end %>
 </select></td></tr>
-<tr> <td align="right"><b>Initial transaction amount</b>:</td> <td><input name="amount"></td> </tr>
-<tr> <td align="right"><b>Initial transaction description</b>:</td> <td><input name="descr"></td> </tr>
-<tr> <td align="right"><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr>
-<tr> <td align="right"><b>Groups</b>:</td> <td><select name="grp" size="5" multiple>
+<tr> <td>Initial transaction amount:</td> <td><input name="amount"></td> </tr>
+<tr> <td>Initial transaction description:</td> <td><input name="descr"></td> </tr>
+<tr> <td><input type="checkbox" name="subscribe" checked></td> <td>Subscribe to hcoop-announce</td> </tr>
+<tr> <td>Groups:</td> <td><select name="grp" size="5" multiple>
 <% foreach group in Group.listGroups () do %>
        <option value="<% #id group %>"<% if #name group = "paying" then %> selected<% end %>><% Web.html (#name group) %></option>
 <% end %>
@@ -101,7 +101,7 @@ elseif $"mod" <> "" then
 </table>
 </form>
 
-<h3><b>Manage current members</b></h3>
+<h3>Manage current members</h3>
 
 <table>
 <% foreach user in Init.listUsers () do %>
diff --git a/vmailpasswd/Makefile b/vmailpasswd/Makefile
new file mode 100644 (file)
index 0000000..8fe703b
--- /dev/null
@@ -0,0 +1,4 @@
+all: passwd.mlt
+
+passwd.mlt: /etc/hcoop.header /etc/hcoop.footer passwd.mlt.in
+       hcoop_html "HCoop: Change virtual mailbox password" passwd.mlt.in >passwd.mlt
index a1c6aba..eb10dab 100644 (file)
@@ -1,7 +1,16 @@
 <html><head>
-<title>Change virtual mailbox password</title>
+<link rel="stylesheet" type="text/css" href="http://hcoop.net/hcoop.css" />
+<title>HCoop: Change virtual mailbox password</title>
 </head><body>
 
+<div class="main">
+
+<div class="title">
+<img class="globe" src="http://hcoop.net/globe.gif" />
+<h1>HCoop: Change virtual mailbox password</h1>
+</div>
+
+<div class="break"></div>
 <% if $"email" <> "" then
        val email = $"email"
        val old = $"old"
        end
 end %>
 
-<h2><b>Change virtual mailbox password</b></h2>
-
 <form action="passwd" method="post">
 
-<table>
-<tr> <td align="right"><b>E-mail address</b>:</td> <td><input name="email" value="<% Web.html ($"email") %>"></td> </tr>
-<tr> <td align="right"><b>Old password</b>:</td> <td><input type="password" name="old"></td> </tr>
-<tr> <td align="right"><b>New password</b>:</td> <td><input type="password" name="new"></td> </tr>
-<tr> <td align="right"><b>Confirm new password</b>:</td> <td><input type="password" name="new2"></td> </tr>
+<table class="blanks">
+<tr> <td>E-mail address:</td> <td><input name="email" value="<% Web.html ($"email") %>"></td> </tr>
+<tr> <td>Old password:</td> <td><input type="password" name="old"></td> </tr>
+<tr> <td>New password:</td> <td><input type="password" name="new"></td> </tr>
+<tr> <td>Confirm new password:</td> <td><input type="password" name="new2"></td> </tr>
 <tr> <td><input type="submit" value="Change"></td> </tr>
 </table>
 
 </form>
+</div>
 
-</body></html>
\ No newline at end of file
+</body></html>
diff --git a/vmailpasswd/passwd.mlt.in b/vmailpasswd/passwd.mlt.in
new file mode 100644 (file)
index 0000000..ca68fb6
--- /dev/null
@@ -0,0 +1,28 @@
+<% if $"email" <> "" then
+       val email = $"email"
+       val old = $"old"
+       val new = $"new"
+       val new2 = $"new2"
+
+       if not (Pass.validEmail email) then
+               %><h2><b>That is not a valid virtual mailbox address!</b></h2><%
+       elseif new <> new2 then
+               %><h2><b>Your new passwords do not match.</b></h2><%
+       elseif not (Pass.change (email, old, new)) then
+               %><h2><b>Error changing password.  Did you enter the right e-mail address and current password?</b></h2><%
+       else
+               %><h2><b>Password changed!</b></h2><%
+       end
+end %>
+
+<form action="passwd" method="post">
+
+<table class="blanks">
+<tr> <td>E-mail address:</td> <td><input name="email" value="<% Web.html ($"email") %>"></td> </tr>
+<tr> <td>Old password:</td> <td><input type="password" name="old"></td> </tr>
+<tr> <td>New password:</td> <td><input type="password" name="new"></td> </tr>
+<tr> <td>Confirm new password:</td> <td><input type="password" name="new2"></td> </tr>
+<tr> <td><input type="submit" value="Change"></td> </tr>
+</table>
+
+</form>