566fd712 |
1 | <% val you = Init.getUserId (); |
20acb925 |
2 | |
56c0e176 |
3 | val yourname = Init.getUserName (); |
4 | val youremail = yourname ^ "@hcoop.net"; |
566fd712 |
5 | |
6 | @header [("title", ["Member preferences"])]; |
7 | |
8 | if $"cmd" = "mod" then |
20acb925 |
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 | |
566fd712 |
15 | if $"dir" = "on" then |
16 | Pref.setDirectory you |
17 | else |
18 | Pref.unsetDirectory you |
56c0e176 |
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 |
1fe415e0 |
25 | %><h3>Error setting <tt>hcoop-discuss</tt> status</h3><% |
56c0e176 |
26 | end; |
27 | |
28 | if not (iff $"misc" = "on" then |
29 | Pref.subscribe ("hcoop-misc", youremail) |
30 | else |
31 | Pref.unsubscribe ("hcoop-misc", youremail)) then |
1fe415e0 |
32 | %><h3>Error setting <tt>hcoop-misc</tt> status</h3><% |
56c0e176 |
33 | end; |
566fd712 |
34 | |
7c1a0a61 |
35 | if not (iff $"sysadmin" = "on" then |
36 | Pref.subscribe ("hcoop-sysadmin", youremail) |
37 | else |
38 | Pref.unsubscribe ("hcoop-sysadmin", youremail)) then |
39 | %><h3>Error setting <tt>hcoop-sysadmin</tt> status</h3><% |
40 | end; |
41 | |
1fe415e0 |
42 | %><h3>Preferences updated</h3><% |
20acb925 |
43 | end; |
44 | |
45 | val you_all = Init.lookupUser you %> |
566fd712 |
46 | |
add44c00 |
47 | <form action="pref" method="post"> |
566fd712 |
48 | <input type="hidden" name="cmd" value="mod"> |
1fe415e0 |
49 | <table class="blanks"> |
20acb925 |
50 | <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> |
51 | <tr> <td><a href="http://checkout.google.com/">Google Checkout</a> e-mail address:</td> <td><input name="checkout" size="60" value="<% switch #checkout you_all of NONE => "" | SOME s => s end %>"></td> </tr> |
52 | <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> |
53 | <tr></tr> |
1fe415e0 |
54 | <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> |
55 | <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> |
7c1a0a61 |
56 | <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> |
1fe415e0 |
57 | <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> |
566fd712 |
58 | <tr> <td><input type="submit" value="Save"></td> </tr> |
59 | </table> |
60 | |
61 | <% @footer[] %> |