| 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 $"misc" = "on" then |
| 29 | Pref.subscribe ("hcoop-misc", youremail) |
| 30 | else |
| 31 | Pref.unsubscribe ("hcoop-misc", youremail)) then |
| 32 | %><h3>Error setting <tt>hcoop-misc</tt> status</h3><% |
| 33 | end; |
| 34 | |
| 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 | |
| 42 | %><h3>Preferences updated</h3><% |
| 43 | end; |
| 44 | |
| 45 | val you_all = Init.lookupUser you %> |
| 46 | |
| 47 | <p><h3>The mailing list checkboxes on this page don't work yet. You should visit <a href="https://members.hcoop.net/portal/pref">the corresponding page on the old portal</a> if you want to change subscriptions.</h3></p> |
| 48 | |
| 49 | <form action="pref" method="post"> |
| 50 | <input type="hidden" name="cmd" value="mod"> |
| 51 | <table class="blanks"> |
| 52 | <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> |
| 53 | <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> |
| 54 | <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> |
| 55 | <tr></tr> |
| 56 | <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> |
| 57 | <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> |
| 58 | <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> |
| 59 | <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> |
| 60 | <tr> <td><input type="submit" value="Save"></td> </tr> |
| 61 | </table> |
| 62 | |
| 63 | <% @footer[] %> |