Add new style and fix up HTML to avoid boilerplate
[hcoop/portal.git] / users.mlt
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 %>