payment: note that Stripe has instituted an additional 1% fee for non-US cards
[hcoop/portal.git] / pref.mlt
1 <% val you = Init.getUserId ();
2
3 val yourname = Init.getUserName ();
4 val youremail = yourname ^ "@hcoop.net";
5
6 @header [("title", ["Member preferences"])];
7
8 if $"cmd" = "mod" then
9 val you_all = Init.getUser ();
10
11 Init.modUser {you_all with
12 paypal = (case $"paypal" of "" => NONE | s => SOME s),
13 checkout = (case $"checkout" of "" => NONE | s => SOME s)};
14
15 if $"dir" = "on" then
16 Pref.setDirectory you
17 else
18 Pref.unsetDirectory you
19 end;
20
21 if not (iff $"discuss" = "on" then
22 Pref.subscribe ("hcoop-discuss", youremail)
23 else
24 Pref.unsubscribe ("hcoop-discuss", youremail)) then
25 %><h3>Error setting <tt>hcoop-discuss</tt> status</h3><%
26 end;
27
28 if not (iff $"help" = "on" then
29 Pref.subscribe ("hcoop-help", youremail)
30 else
31 Pref.unsubscribe ("hcoop-help", youremail)) then
32 %><h3>Error setting <tt>hcoop-help</tt> status</h3><%
33 end;
34
35 if not (iff $"misc" = "on" then
36 Pref.subscribe ("hcoop-misc", youremail)
37 else
38 Pref.unsubscribe ("hcoop-misc", youremail)) then
39 %><h3>Error setting <tt>hcoop-misc</tt> status</h3><%
40 end;
41
42 if not (iff $"sysadmin" = "on" then
43 Pref.subscribe ("hcoop-sysadmin", youremail)
44 else
45 Pref.unsubscribe ("hcoop-sysadmin", youremail)) then
46 %><h3>Error setting <tt>hcoop-sysadmin</tt> status</h3><%
47 end;
48
49 %><h3>Preferences updated</h3><%
50 end;
51
52 val you_all = Init.lookupUser you %>
53
54 <form action="pref" method="post">
55 <input type="hidden" name="cmd" value="mod">
56 <table class="blanks">
57 <tr> <td><a href="http://www.paypal.com/">PayPal</a> e-mail address:</td> <td><input name="paypal" size="60" value="<% switch #paypal you_all of NONE => "" | SOME s => s end %>"></td> </tr>
58 <tr> <td colspan="2" style="font-weight: normal; text-align: left">(E-mail addresses you enter here should match those seen by recipients of payments that you send.)</td> </tr>
59 <tr></tr>
60 <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>
61 <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>
62 <tr> <td><input type="checkbox" name="help"<% if Pref.subscribed ("hcoop-help", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-help</tt> mailing list. <i>(Members-helping-members support on how to use HCoop services)</i></td> </tr>
63 <tr> <td><input type="checkbox" name="sysadmin"<% if Pref.subscribed ("hcoop-sysadmin", youremail) then %> checked<% end %>></td> <td>Include me on the <tt>hcoop-sysadmin</tt> mailing list. <i>(Discussion about technical adminstrative planning and related issues, not dealing directly with member support requests)</i></td> </tr>
64 <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>
65 <tr> <td><input type="submit" value="Save"></td> </tr>
66 </table>
67
68 <% @footer[] %>