A cautionary tale about .mailman
[bpt/portal.git] / pref.mlt
CommitLineData
27e48ace 1<% val you = Init.getUserId ();
89627e97
AC
2val yourname = Init.getUserName ();
3val youremail = yourname ^ "@hcoop.net";
27e48ace
AC
4
5@header [("title", ["Member preferences"])];
6
7if $"cmd" = "mod" then
8 if $"dir" = "on" then
9 Pref.setDirectory you
10 else
11 Pref.unsetDirectory you
89627e97
AC
12 end;
13
14 if not (iff $"discuss" = "on" then
15 Pref.subscribe ("hcoop-discuss", youremail)
16 else
17 Pref.unsubscribe ("hcoop-discuss", youremail)) then
b6dd1aaf 18 %><h3>Error setting <tt>hcoop-discuss</tt> status</h3><%
89627e97
AC
19 end;
20
21 if not (iff $"misc" = "on" then
22 Pref.subscribe ("hcoop-misc", youremail)
23 else
24 Pref.unsubscribe ("hcoop-misc", youremail)) then
b6dd1aaf 25 %><h3>Error setting <tt>hcoop-misc</tt> status</h3><%
89627e97 26 end;
27e48ace 27
b6dd1aaf 28 %><h3>Preferences updated</h3><%
27e48ace
AC
29end %>
30
a4ccdb5e 31<form action="pref" method="post">
27e48ace 32<input type="hidden" name="cmd" value="mod">
b6dd1aaf
AC
33<table class="blanks">
34<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>
35<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>
36<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>
27e48ace
AC
37<tr> <td><input type="submit" value="Save"></td> </tr>
38</table>
39
40<% @footer[] %>