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 | ||
28 | if not (iff $"misc" = "on" then | |
29 | Pref.subscribe ("hcoop-misc", youremail) | |
30 | else | |
31 | Pref.unsubscribe ("hcoop-misc", youremail)) then | |
b6dd1aaf | 32 | %><h3>Error setting <tt>hcoop-misc</tt> status</h3><% |
89627e97 | 33 | end; |
27e48ace | 34 | |
bf47b57b AC |
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 | ||
b6dd1aaf | 42 | %><h3>Preferences updated</h3><% |
d5f8418b AC |
43 | end; |
44 | ||
45 | val you_all = Init.lookupUser you %> | |
27e48ace | 46 | |
a4ccdb5e | 47 | <form action="pref" method="post"> |
27e48ace | 48 | <input type="hidden" name="cmd" value="mod"> |
b6dd1aaf | 49 | <table class="blanks"> |
d5f8418b AC |
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> | |
b6dd1aaf AC |
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> | |
bf47b57b | 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> |
b6dd1aaf | 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> |
27e48ace AC |
58 | <tr> <td><input type="submit" value="Save"></td> </tr> |
59 | </table> | |
60 | ||
61 | <% @footer[] %> |