TODOs
=====

UX cleanup
----------

* Move the configuration form to be a formlib form in a separate tab, rather
  than an additional fieldset on the item being RSVP-enabled.

* Automatic form configuration

  - Deprecate the basic formlib registration form.
  
  - Choose either the existing option to select an existing custom PFG form,
    or a new option to create a new form.  The latter will create a PFG form
    in the same container as the RSVPable item, along with:
    
     - lead and campaign adapters with a reasonable default field mapping
     
     - an sf-object-id field for passing in the ID of the campaignish object
  
  - The RSVP viewlet should show a link to edit the associated form.

* If GetPaid is installed, also support a "GetPaid checkout form" option for
  the generated form.  In addition to the standard PFG configuration, this
  will also:

  - make sure the item is buyable
  
  - set up a getpaid.formgen adapter in one-shot checkout mode, and make sure
    the eventish item gets added to the cart as a line item
  
  - (instead of the normal salesforce adapters) set up
    getpaid.SalesforcePloneFormGen adapters with a reasonable default field
    mapping

* Create a SOSL search widget for selecting a campaignish item from Salesforce.
  Should still support pasting an ID too.
  (Edge case to investigate: what if a configured campaign no longer exists?)

* Move the capacity and waitlist field configuration to a sitewide configlet
  (probably set per sObject type).  If a Campaignish object is selected that
  doesn't have these fields configured, show a notice instead of the option
  to enable capacity checks.

* Any way to avoid the expensive describeSObjects call?

* Add option for whether to display the form inline or on a separate page.

* (lower priority) Some way to turn on RSVPs for all items of a given portal
  type.


Code cleanup
------------

* Use plain jquery for the AJAXy bits of the configuration form, instead of
  KSS.

Misc
----

* Improve uninstallation
  - Better test coverage and experimentation of uninstallation scenarios
    not yet covered by CMFQuickinstallerTool's interaction with GenericSetup.
    The included "uninstall" profile is experimental and possibly problematic.
  - Along the same line, make sure (via automated tests) stuff reinstalls
    correctly if either the full or partial uninstallation path is taken.
  - Add overview of current *complete* uninstallation process

* Additional potential enhancements:

  - Ability to customize "Register" message would be good via the UI since this
    can be used in other use-cases (i.e. letter signing, sign-up)

  - Provide a Register and Join Waitlist option as link text (we just use the
    former for everything now)

  - Phone Type - On the default form ask preferred phone type [EDIT NOTE: Phone
    fields include work, home, mobile, other]

  - If a user is following the default configuration whereby the RSVP-aware
    Salesforce.com object is a Campaign and a Lead is created and joined to the
    Campaign via a CampaignMember object, present a selection list with all
    relevant "status" options as determined by the available CampaignMemberStatus
    options associated with the chosen Campaign's Id. 

    This could be trivially done via the following pseudoish-code and enabled/disabled with kss::

      >>> campaign_member_statuses = salesforce.query("SELECT Id, Label FROM CampaignMemberStatus WHERE CampaignId == '%s'" % self.campaign_id)
      >>> [(k,v) for k,v in campaign_member_statuses['results']]

  - Would be nice to redirect directly to the RSVP schema when an item is
    RSVP-enabled.

  - Would be nice to jump to the form anchor if there's a validation error.
