Introduce new `communication_style` field for Contacts
Add new field in the Communication Preferences block, mostly for driving
the new conditional greeting templates. (Though other uses are
possible of course.)
The Communication Style field is implemented as radio buttons defined
through an option group (pseudoconstant), similar to the Gender field.
Unlike Gender, it has a default value assigned automatically for new
contacts.
The field is placed just above the Email Greeting, Postal Greeting, and
Addresse controls, as it's meant to be used as a kind of master switch
driving the various greeting templates. Just like the Prefix/Suffix
fields in the name block for Individual contacts, the Communication
Style field is automatically hidden from all forms and views if no
option values are defined for the field.
The database field comes with an index, like all(?) pseudoconstant
fields. Presently the index is not used much (probably the only place
being deletion of existing option values); but this is likely to change
when more functionality is added around this field in the future.
(Search etc.)
The handling of the new field throughout the CiviCRM code base should be
mostly complete. We deliberately punted on some of the obvious, larger
pieces of functionality (search, import, profiles) for now, as they
would require considerable additional effort, so we treat them as extra
features to be implemented seperately upon need. We tried to be complete
with all smaller bits (mostly by grepping for `gender`, which requires
similar handling in most places...); but we might have omitted some,
and/or done some that aren't actually necessary -- it's rather hard to
tell sometimes what a particular piece of code is all about...
20 files changed: