Commit | Line | Data |
---|---|---|
27e48ace | 1 | <% val you = Init.getUserId (); |
d5f8418b | 2 | |
89627e97 AC |
3 | val yourname = Init.getUserName (); |
4 | val youremail = yourname ^ "@hcoop.net"; | |
27e48ace AC |
5 | |
6 | @header [("title", ["Member preferences"])]; | |
7 | ||
8 | if $"cmd" = "mod" then | |
d5f8418b AC |
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 | ||
27e48ace AC |
15 | if $"dir" = "on" then |
16 | Pref.setDirectory you | |
17 | else | |
18 | Pref.unsetDirectory you | |
89627e97 AC |
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 | |
b6dd1aaf | 25 | %><h3>Error setting <tt>hcoop-discuss</tt> status</h3><% |
89627e97 AC |
26 | end; |
27 | ||
3cb8bb64 AC |
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 | ||
89627e97 AC |
35 | if not (iff $"misc" = "on" then |
36 | Pref.subscribe ("hcoop-misc", youremail) | |
37 | else | |
38 | Pref.unsubscribe ("hcoop-misc", youremail)) then | |
b6dd1aaf | 39 | %><h3>Error setting <tt>hcoop-misc</tt> status</h3><% |
89627e97 | 40 | end; |
27e48ace | 41 | |
bf47b57b AC |
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 | ||
b6dd1aaf | 49 | %><h3>Preferences updated</h3><% |
d5f8418b AC |
50 | end; |
51 | ||
52 | val you_all = Init.lookupUser you %> | |
27e48ace | 53 | |
a4ccdb5e | 54 | <form action="pref" method="post"> |
27e48ace | 55 | <input type="hidden" name="cmd" value="mod"> |
b6dd1aaf | 56 | <table class="blanks"> |
d5f8418b AC |
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><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> | |
59 | <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> | |
60 | <tr></tr> | |
b6dd1aaf AC |
61 | <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> |
62 | <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> | |
3cb8bb64 | 63 | <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> |
bf47b57b | 64 | <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> |
b6dd1aaf | 65 | <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 |
66 | <tr> <td><input type="submit" value="Save"></td> </tr> |
67 | </table> | |
68 | ||
69 | <% @footer[] %> |